"Support" channel for act. Please try to keep all your messages in a thread. We recommend using https://gist.github.com for providing code
unbound variable
error as well. If in my action.yml
file I've got an input defined with a default value (e.g. called min_score
), should there be an environment variable INPUT_MIN_SCORE
that is set to this default value available in entrypoint.sh
file? Because I'm getting unbound variable
errors in this case. I'm not sure if it's how GH actions work or if it's a bug in act itself.
name: Lint Actions workflows
on:
pull_request:
paths:
- .github/workflows/*.yaml
jobs:
lint:
runs-on: ubuntu-latest
container:
image: rhysd/actionlint:latest
args: --entrypoint sh
steps:
- name: Run lint
run: |
echo "::add-matcher::.github/actionlint-matcher.json"
for file in .github/workflows/*.yaml; do
if [ -f "$file" ]; then
actionlint -color $file
fi
done
act pull_request -j lint
I get the error:[Lint Actions workflows/lint] π³ docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/user/git/work/owner/terraform-template-repository/master/workflow/0] user=
[Lint Actions workflows/lint] Exec command '[bash --noprofile --norc -e -o pipefail /Users/user/git/work/owner/terraform-template-repository/master/workflow/0]'
| OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "bash": executable file not found in $PATH: unknown
DEBU[0000] exit with `FAILURE`: 126
I'm using act 0.2.24 and it appears not to copy the repo. Here is a simple workflow that reproduces this:
name: "Test that local file exists"
on:
push:
jobs:
setup_state_calibration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Make sure requirements.txt exists
run: ls requirements.txt
This gives an error ls: cannot access 'requirements.txt': No such file or directory
. I found a similar thread that suggested using act -P ubuntu-latest=shivammathur/node:latest
but this produced the same result. I can add a with
statement to the check to get the full repo and then this works. However, I'm making local changes so I really want to use my local repo. Any suggestions or workarounds?
Hi!
I can't get azure/login@v1 using service principal (https://github.com/Azure/login#configure-a-service-principal-with-a-secret)
to work locally. When I create the secret in GitHub it works fine:
{ "clientId": "6e...","clientSecret": "TC...", "subscriptionId": "bc...", "tenantId": "a3..." }
When running locally I tested to set the environment variable, both in shell and in file:
SP_CREDS={ "clientId": "6e...","clientSecret": "TC...", "subscriptionId": "bc...", "tenantId": "a3..." }
Then referencing it:
I've tried escaping the quotes, and even trying to put the entire JSON blob directly in the action, but it doesn't work:
[Test/Test] π³ docker exec cmd=[node /var/run/act/actions/azure-login@v1/lib/main.js] user=
[Test/Test] Exec command '[node /var/run/act/actions/azure-login@v1/lib/main.js]'
[Test/Test] β ::error::Az CLI Login failed. Please check the credentials. For more information refer https://aka.ms/create-secrets-for-GitHub-workflows
time="2021-11-24T15:35:37+01:00" level=debug msg="exit with FAILURE
: 1"
[Any Test/Test] β Failure - Login to Azure
time="2021-11-24T15:35:37+01:00" level=debug msg="exit with FAILURE
: 1"
Error: exit with FAILURE
: 1
I'm running on Windows as host platform...
Any idea what can be wrong?
act
in https://github.blog/2021-11-04-10-github-actions-resources-basics-ci-cd/#learn-how-to-test-github-actions-you-build but they wrote that it's an action for GitHub Actions :D
Hi!
First of all, thanks for the tool. It is very significant and helpful!
I'm working on trying to create a "local test environment" for Github actions.
These actions invoke a nodejs script that makes some API requests to Github. Is there the possibility to mock this interaction? If yes, how can I reach this goal? Thanks for the help!
Hi! Thanks for this extremely useful tool. I'm currently trying to work out how to locally simulate a deployment step - my Actions file creates several folders of documentation and then uploads them to GitHub Pages. When testing locally I'd like to have these in a local folder so I can look through them, but I can't work out how to get act to do this. In particular, at the end of a successful job, act removes the docker container and volume (see issue here: nektos/act#921).
Does anyone have any idea how I can either 1) get act to keep the docker container alive or 2) mount an external volume into the act job that I can copy files into as part of the run itself?
Hi,
How to simulate the event ${{ github.event.workflow_run.conclusion == 'success' }}
?
I have a workflow like this:
name: build stuff
on:
workflow_run:
workflows: ["construct-build-container"]
types: [completed]
jobs:
on-success:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: [self-hosted, kubernetes, docker]
container: ubuntu:20.04
steps:
- run: echo ${{ github.event.workflow_run.conclusion }}
- run: |
echo yo!
I'm running it with act workflow_run -e workflow_scripts/build_completed.json
json:
{
"check_run": {
"conclusion": "success",
"check_suite": {
"conclusion": "success"
}
}
}
But still get an error:ERRO[0000] Unable to interpolate string 'echo ${{ github.event.workflow_run.conclusion }}' - [TypeError: Cannot access member 'conclusion' of undefined]
Hello,
I have a trouble using act on my computer.
I start act
as usual, but it hangs:
bash > act -W .github/workflows/my-workflow.yml
[Test and Build/build] π Start image=catthehacker/ubuntu:act-latest
[Test and Build/build] π³ docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Test and Build/build] π³ docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root
[Test and Build/build] π³ docker cp src=/mnt/c/GitHub/dbg-proj/. dst=/mnt/c/GitHub/dbg-proj
[Test and Build/build] π³ docker exec cmd=[mkdir -p /mnt/c/GitHub/dbg-proj] user=
I'm using WSL2 on Win 10. It was running perfect recently. Perhaps, some update or a configuration change has damaged something. Any ideas?
Any help will be much appreciated.
act
on my computer from their action, but not sure how to go about saving the docker image.
Hi, I'm just getting started with nektos/act and I am running into issues setting up. When I run 'act' I get:
10:59 $ act -j build
[CI/build] π Start image=harbor.rocsys.dev/rocsys/ci-vision:0.3.0
[CI/build] π³ docker pull image=harbor.rocsys.dev/rocsys/ci-vision:0.3.0 platform= username= forcePull=false
[CI/build] π³ docker create image=harbor.rocsys.dev/rocsys/ci-vision:0.3.0 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/build] π³ docker run image=harbor.rocsys.dev/rocsys/ci-vision:0.3.0 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/build] π³ docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir=
[CI/build] π³ docker cp src=/home/***/gits/rocsys/rocsys-vision/. dst=/home/***/gits/rocsys/rocsys-vision
[CI/build] π³ docker exec cmd=[mkdir -p /home/***/gits/rocsys/rocsys-vision] user= workdir=
[CI/build] β Run Setup Git Credentials
INFO[0002] β git clone 'https://github.com/fusion-engineering/setup-git-credentials' # ref=v2
[CI/build] π³ docker cp src=/home/***/.cache/act/fusion-engineering-setup-git-credentials@v2/ dst=/var/run/act/actions/fusion-engineering-setup-git-credentials@v2/
[CI/build] π³ docker exec cmd=[mkdir -p /var/run/act/actions/fusion-engineering-setup-git-credentials@v2/] user= workdir=
[CI/build] π³ docker exec cmd=[node /var/run/act/actions/fusion-engineering-setup-git-credentials@v2/lib/main.js] user= workdir=
| OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "node": executable file not found in $PATH: unknown
[CI/build] β Failure - Setup Git Credentials
Error: exit with `FAILURE`: 126
The relevent step is written as follows:
steps:
- name: Setup Git Credentials
uses: fusion-engineering/setup-git-credentials@v2
with:
credentials: ${{secrets.CI_GIT_CREDENTIALS}}
I cannot figure out how to fix this. I have node
installed on my machine but I don't think that is relevant.
act
in a project with workflows setup, act simply exits without doing anything and running act -l
shows no workflows at all.
act
. Thanks for the help! βοΈ
on: pull_request
, rather than pull_request
, so maybe that help message is a bit confusing. But thanks for the quick help :)
/root/.dotnet/sdk/5.0.404/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/mnt/g/Projects/HardwareMonitor/Windows/Testing/Testing.csproj]
| /root/.dotnet/sdk/5.0.404/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(89,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/mnt/g/Projects/HardwareMonitor/Windows/Frontend/Frontend.csproj]
Hi there,
would it be possible to have more contributors with write access to act? Currently the project feels a bit limited by the time available to review and merge PRs.
This still seems to be an issue. We have a couple of PRs open and not much is happening at the moment. It would be great to get an answer from @cplee about this.
/cc @KnisterPeter @catthehacker
docker/metadata-action@v3
. I'm getting the error ::error::Parameter token or opts.auth is required
. I don't understand what this error means? Is docker/metadata-action@v3
supported? The full step looks as follows: - name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: harbor.rocsys.dev/rocsys/socketnet
act
that includes a call to docker run
I get docker: Got permission denied while trying to connect to the Docker daemon socket
but on github I don't. I'm currently using the ubuntu-latest=ghcr.io/catthehacker/ubuntu:full-latest
runner.
act
's runner uses?