act: Maven Step Fails
Expected behavior:
- Maven commands (
mvn
) execute when usingact -P ubuntu-latest=nektos/act-environments-ubuntu:18.04-full
Actual behavior:
- Maven builds fail due to Maven not being installed.
| /github/workflow/3: line 2: mvn: command not found
[Build, Test, and Upload/Java Application Container] ❌ Failure - Compile and Test Using Maven
The environments image appears to be either out-of-date, or does not install the same tools/dependencies as the GitHub virtual-environments. This means that currently, Java builds that can be executed directly from GitHub Actions cannot be ran locally.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 29 (9 by maintainers)
Same issue. A resolution would be very helpful
I got the same error, how can i fix this ?
FWIW I created an image which adds Maven https://quay.io/repository/jamezp/act-maven.
@vroyer @aaron-goulet-bfg Temporary workaround until fix is released.
Omg, you are a god amongst men!
For anyone who is unsure on how to run the image - it took me a while to figure it out - then you have to run it like this:
act -P ubuntu-latest=quay.io/jamezp/act-maven
when can we expect a fix for this?
@aaron-goulet-bfg can you share a sample workflow file?
Ok, is there an “official”
act
image that includesmvn
or shall I just install it prior to running anything on it?That’s because
mvn
is not installed in that imageproper command would be
act -j build_linux_arm64 -P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:runner-18.04 --container-architecture linux/amd64
but from what I see, workflow is using
ubuntu-latest
so it should be-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:runner-18.04
this doesn’t work for me, I chose Large image at install and my
~/.actrc
contains:but still I have the same issue when running
same problem here
Another decent workaround @jeff-miller-cfa ; use the full docker image
act -j build -P ubuntu-latest=nektos/act-environments-ubuntu:18.04