Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Josh Soref
    catthehacker: my make test is failing w/ Failure - actions/hello-world-docker-action@b136eb8 / short SHA references are not supported -- i understand it isn't supported, but are the tests supposed to fail?
    Ryan (hackercat)
    doubt it fails on that
    Josh Soref
    it's possible i'm reading the output wrong https://www.irccloud.com/pastebin/XesgKiOD/
    Once the tests stop failing, I can post a fix for 655
    Ryan (hackercat)
    it's a dry run that should fail internally but understand the message
    Josh Soref
    ok, so something else is failing
    is there an easy way to get make test to tell me what's actually failing?
    1 reply
    Ryan (hackercat)
    Josh Soref
    act seems to use golang structtags, do you know much about them/act's use of them?
    i'm wondering if act is expecting otto to be aware of them
    Ryan (hackercat)
    you mean struct ?
    Ryan (hackercat)
    that's a field in struct
    but I still don't get what you mean
    Josh Soref
    ok, great, so you know about them
    Ryan (hackercat)
    uhm yeah?

    Hi! I'm having a bit of trouble using actions/setup-node@v2 with nektos act (version 0.2.22 on Mac OS 11.2.3).

    Despite identifying the version at 16 and despite seemingly fetching the proper version (16.1.0)
    the installed version is v12.22.1 (See next to last line of console output below).

    I wonder if anyone knows what I may be doing wrong?

    Actions file:

    name: Nektos Act Wrong Verions
        runs-on: ubuntu-20.04
        - uses: actions/setup-node@v2
            node-version: 16
        - name: Version
          run: node -v

    Console output (Abbreviated):

    | Attempting to download 16...
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::check 16.1.0 satisfies 16
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::x64===x64 && darwin===linux
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::x64===x64 && linux===linux
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::matched 16.1.0
    | Acquiring 16.1.0 - x64 from https://github.com/actions/node-versions/releases/download/16.1.0-812584101/node-16.1.0-linux-x64.tar.gz
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::Downloading https://github.com/actions/node-versions/releases/download/16.1.0-812584101/node-16.1.0-linux-x64.tar.gz
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::Destination /tmp/f03aac3b-2fd0-4a35-882a-8fe0e02fddaa
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::download complete
    | Extracting ...
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::Checking tar --version
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::tar (GNU tar) 1.30%0ACopyright (C) 2017 Free Software Foundation, Inc.%0ALicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.%0AThis is free software: you are free to change and redistribute it.%0AThere is NO WARRANTY, to the extent permitted by law.%0A%0AWritten by John Gilmore and Jay Fenlason.
    | [command]/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword -C /tmp/1e64a7d1-84c5-4503-afa3-32ec1adfa512 -f /tmp/f03aac3b-2fd0-4a35-882a-8fe0e02fddaa
    | Adding to the cache ...
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::Caching tool node 16.1.0 x64
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::source dir: /tmp/1e64a7d1-84c5-4503-afa3-32ec1adfa512
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::destination /opt/hostedtoolcache/node/16.1.0/x64
    [Nektos Act Wrong Verions/tests]   πŸ’¬  ::debug::finished caching tool
    | Done
    [Nektos Act Wrong Verions/tests]   ❓  ##[add-matcher]/Users/john/Projects/nektos-act-issue/_actions/actions-setup-node@v2/.github/tsc.json
    [Nektos Act Wrong Verions/tests]   ❓  ##[add-matcher]/Users/john/Projects/nektos-act-issue/_actions/actions-setup-node@v2/.github/eslint-stylish.json
    [Nektos Act Wrong Verions/tests]   ❓  ##[add-matcher]/Users/john/Projects/nektos-act-issue/_actions/actions-setup-node@v2/.github/eslint-compact.json
    [Nektos Act Wrong Verions/tests]   βœ…  Success - actions/setup-node@v2
    WARN[0008] unable to get git revision: open /Users/john/Projects/nektos-act-issue/.git/refs/heads/main: no such file or directory 
    WARN[0008] unable to get git ref: open /Users/john/Projects/nektos-act-issue/.git/refs/heads/main: no such file or directory
    WARN[0008] unable to get git revision: open /Users/john/Projects/nektos-act-issue/.git/refs/heads/main: no such file or directory 
    WARN[0008] unable to get git ref: open /Users/john/Projects/nektos-act-issue/.git/refs/heads/main: no such file or directory 
    [Nektos Act Wrong Verions/tests] ⭐  Run Version
    | v12.22.1
    [Nektos Act Wrong Verions/tests]   βœ…  Success - Version
    23 replies
    Aaron Prindle

    I am having some issues intalling a binary (gcloud) using nektos/act. How can a binary be added to sudo path nektos/act? Currently I am running:

     echo "/google-cloud-sdk/bin" >> $GITHUB_PATH

    wondering if there might be something I am missing? Thanks

    Getting the error:
    [release (linux)/Release binary integration tests] ⭐  Run Configure GCloud with Docker
    | sudo: gcloud: command not found
    This error occurs attempting to run:
        - name: Configure GCloud with Docker
          run:  sudo -E gcloud auth configure-docker
    Aaron Prindle
    Seems I am not getting this error w/ non sudo command, any idea how to update sudo path?
    Is there any workaround to #295 besides separating things into different workflows that use file input and output? The needs context forces jobs in the same workflow to run consecutively rather than concurrently so it not being implemented means (as of now) you have to change the workflows to test them and then run them one after another manually, making the act check useless (because you can't test exactly what's going to be used on GitHub).
    Yonatan Kra
    Hi, I'm getting this error when trying to run Act:
    ::error::context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'
    I ran the command:
    act workflow_dispatch -j test-UI
    I see it creates the volume and the container is up and running.
    It just throws this error and doesn't run the action. Any hint as to how this happens or how to debug this?
    2 replies

    Hi everyone,

    I'm running act (currently built from master, version 0.2.22-12-g4900399-dirty, but I have similar issues using a local build of v0.2.22, version 0.2.22-dirty) using the catthehacker/ubuntu:full-20.04 image. I keep getting errors like
    [build-images/build-and-push] 🐳 docker cp src=/home/personalcomputer/.cache/act/docker-login-action@v1/ dst=/home/personalcomputer/org/repo/_actions/docker-login-action@v1/
    [build-images/build-and-push] Exec command '[mkdir -p /home/personalcomputer/org/repo/_actions/docker-login-action@v1/]'
    | mkdir: cannot create directory '/home/personalcomputer/org/repo/_actions': Permission denied
    Upon autopsy, it looks like the docker container copies over the root of my project (/home/personalcomputer/org/repo/) using user root, so that the user runner can't execute the needed mkdir.

    I'm not very familiar with act, so if anyone knows a fix for this, I'd really appreciate it.

    5 replies

    Thanks for your help the other day Ryan (hackercat) .

    I was debugging another issue and found that, when I copy the event data for the event that triggered my most recent run in github actions (actually in GHA, not in act) and feed that data to act using --eventdata, nothing gets triggered. Do you have any idea why that is? The event was a pull request opening, if that matters.

    Have you told act to process the pull_request event?
    1 reply
    e.g. act pull_request --eventdata path/to/event.json, otherwise it will only trigger push

    I have another error that I'm hoping someone can help me with. Whether I specify an event JSON file (using --eventdata) or not, I have one repo where I keep getting the following error when my workflow gets to a docker/build-push-action@v2 step:

    [docker/build-and-push]   ❗  ::error::buildx call failed with:
                                    failed to solve:
                                        rpc error:
                                            code = Unknown desc = failed to solve with frontend dockerfile.v0:
                                                failed to read dockerfile:
                                                    failed to fetch remote https://github.com/git@github:org/repo.git.git:
                                                        exit status 128

    The problem is apparent from the error message but I don't know how to fix it.

    It's worth noting that I have another repo with a workflow that used the docker/build-push-action@v2 step and act has no issues with that workflow.

    2 replies
    How can I ssh into the docker and see the run results, I want to verify the file system is changed after run
    4 replies
    I am hoping if some once can help me with Win 10 install of act. I am not clear on the instruction to add binary to the PATH in widows , what exactly needs to be done here ? Here is what I did 1. downloaded the latest release 2. Added main.go file path to the env variable. I am still not able to run it from command prompt
    1 reply
    I do have docket Desktop running at my end
    Shubham Pathak
    how to trigger a particular workflow_dispatch action?
    1 reply
    Audrea Cook

    I'm brand new to both Docker and nektos/act, and I could use an assist. When I run act, I get the following (abbreviated) output:

    [CI/Set up CI environment          ] πŸš€  Start image=catthehacker/ubuntu:act-latest
    # ...
    [CI/Set up CI environment          ]   ❓  ::group::Installing Bundler
    | Using Bundler 2.1.4 from Gemfile.lock BUNDLED WITH 2.1.4
    | [command]/opt/hostedtoolcache/Ruby/2.7.2/x64/bin/gem install bundler -v 2.1.4 --no-document
    | /lib64/ld-linux-x86-64.so.2: No such file or directory
    | Took   0.03 seconds
    [CI/Set up CI environment          ]   ❓  ::endgroup::
    [CI/Set up CI environment          ]   ❗  ::error::The process '/opt/hostedtoolcache/Ruby/2.7.2/x64/bin/gem' failed with exit code 255
    [CI/Set up CI environment          ]   ❌  Failure - SETUP | Set up Ruby
    Error: exit with `FAILURE`: 1

    If someone could point me in the right direction to solve this issue, I'd greatly appreciate it. Thank you!

    11 replies
    JR Desire

    Hi all, I am new to using nektos/act. I seem to be running into an issue with AWS credentials. It was working last week but I am having issues with Signature V4. I even updated the tokens but it still is not working. Any help would be appreciated!

    ←[34m[Push image to Amazon ECR/Push Image                ] ←[0m  ☁  git clone 'https://github.com/aws-actions/configure-aws-credentials' # ref=v1
    ←[34m[Push image to Amazon ECR/Push Image                ] ←[0m  🐳  docker cp src=act/aws-actions-configure-aws-credentials@v1 dst=/actions/
    ←[34m[Push image to Amazon ECR/Push Image                ] ←[0m  βš™  ::add-mask::***
    ←[34m[Push image to Amazon ECR/Push Image                ] ←[0m  βš™  ::add-mask::***
    ←[34m[Push image to Amazon ECR/Push Image                ] ←[0m  ❗  ::error::Signature expired: 20210531T174007Z is now earlier than 20210604T020007Z (20210604T021507Z - 15 min.)

    act version 0.2.20

    1 reply
    Hello! I'm just starting with act. Right now, I have a script that uses ${{ github.event.inputs.logLevel }} . I can't figure how to pass this value to act... Can anyone help please?
    1 reply
    Katee Trant
    Hi! I'm trying to get act up and running for my action, but act -l is only displaying workflows that are on push and not pull_request. If I change the workflow on to push it shows up. Did I miss a step?
    1 reply
    Audrea Cook

    Happy Monday! Back to trying to get this to work on my M1.
    When I run act --container-architecture linux/amd64 -P ubuntu-latest=catthehacker/ubuntu:runner-latest it errors out with the following when trying to set up Node:
    ❗ ::error::EACCES: permission denied, open '/var/run/act/workflow/paths.txt'

    However, when I try to open the specified file, it doesn't exist. In fact, /var/run/act doesn't exist on my machine. Do I need to create this directory manually?

    4 replies

    I'm trying to setup act on my mac and it is giving a trouble at the checkout step. Can someone check and let me know what could be wrong?

    Here is the error that I see:

    $ act -j run-tests
    [CI/Run tests           ] πŸš€  Start image=golang:1.13-alpine3.11
    [CI/Run tests           ]   🐳  docker run image=golang:1.13-alpine3.11 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
    [CI/Run tests           ] ⭐  Run Checkout
    [CI/Run tests           ]   ☁  git clone 'https://github.com/actions/checkout' # ref=v2
    [CI/Run tests           ]   🐳  docker cp src=/Users/deviasl/.cache/act/actions-checkout@v2/ dst=/Users/deviasl/go/src/github.com/XXXXXXXX/_actions/actions-checkout@v2/
    | OCI runtime exec failed: exec failed: container_linux.go:367: starting container process caused: exec: "node": executable file not found in $PATH: unknown
    [CI/Run tests           ]   ❌  Failure - Checkout
    Error: exit with `FAILURE`: 126
    2 replies
    oh come on, what is wrong with codecov today
    1 reply
    Why would act delete entire contents of the working directory? I've lost today's work.
    $ act --secret-file test.secrets -j run-local-tests
    [CI/Cancel Previous Runs] 🚧  Skipping unsupported platform 'self-hosted'
    [CI/Run tests           ] πŸš€  Start image=golang:1.13-alpine3.11-node
    [CI/Run tests           ]   🐳  docker run image=golang:1.13-alpine3.11-node platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
    [CI/Run tests           ] ⭐  Run Checkout
    [CI/Run tests           ]   ☁  git clone 'https://github.com/actions/checkout' # ref=v2
    [CI/Run tests           ]   🐳  docker cp src=/Users/deviasl/.cache/act/actions-checkout@v2/ dst=/Users/deviasl/go/src/github.com/xxxxx/_actions/actions-checkout@v2/
    [CI/Run tests           ]   ❓  ::save-state name=isPost,::true
    [CI/Run tests           ]   πŸ’¬  ::debug::GITHUB_WORKSPACE = '/Users/deviasl/go/src/github.com/xxxxx'
    [CI/Run tests           ]   πŸ’¬  ::debug::qualified repository = 'xxxxx'
    [CI/Run tests           ]   πŸ’¬  ::debug::ref = 'refs/heads/test2'
    [CI/Run tests           ]   πŸ’¬  ::debug::commit = '4437da927fd966dd1580278265exxxxxx'
    [CI/Run tests           ]   πŸ’¬  ::debug::clean = true
    [CI/Run tests           ]   πŸ’¬  ::debug::fetch depth = 0
    [CI/Run tests           ]   πŸ’¬  ::debug::lfs = false
    [CI/Run tests           ]   πŸ’¬  ::debug::submodules = false
    [CI/Run tests           ]   πŸ’¬  ::debug::recursive submodules = false
    [CI/Run tests           ]   ❓  ::add-matcher::/Users/deviasl/go/src/github.com/xxxxx/_actions/actions-checkout@v2/dist/problem-matcher.json
    | Syncing repository: xxxxx
    [CI/Run tests           ]   ❓  ::group::Getting Git version info
    | Working directory is '/Users/deviasl/go/src/github.com/xxxxx'
    [CI/Run tests           ]   ❓  ::endgroup::
    | Deleting the contents of '/Users/deviasl/go/src/github.com/xxxxx'
    | The repository will be downloaded using the GitHub REST API
    | To create a local Git repository instead, add Git 2.18 or higher to the PATH
    | Downloading the archive
    | 404: Not Found
    9 replies
    Veck Hsiao

    Hi all, I am new to act.
    I want to run act on my local which involves docker container image.
    But I got the following error while running:

    > act                                                                                                          ──(ι€±δΊŒ,06/08/21)β”€β”˜
    [ci/build] πŸš€  Start image=circleci/node:latest
    [ci/build]   🐳  docker run image=circleci/node:latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
    [ci/build] ⭐  Run Setup file system permissions
    | /bin/chmod: cannot access '/github': No such file or directory
    | /bin/chmod: cannot access '/__w/_temp': No such file or directory
    [ci/build]   ❌  Failure - Setup file system permissions

    The two lines are in my steps which copied from GitHub Actions document:

          # This Docker file changes sets USER to circleci instead of using the default user, so we need to update file permissions for this image to work on GH Actions.
          # See https://docs.github.com/actions/reference/virtual-environments-for-github-hosted-runners#docker-container-filesystem
          - name: Setup file system permissions
            run: sudo chmod -R 777 $GITHUB_WORKSPACE /github /__w/_temp

    Any idea?

    2 replies
    Hi all, using act, I am getting this issue when running an npm install
    | > @bigcommerce/node-sass@3.5.0 install /usr/lib/node_modules/@bigcommerce/stencil-cli/node_modules/@bigcommerce/node-sass
    | > node scripts/install.js
    | [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@bigcommerce/stencil-cli/node_modules/@bigcommerce/node-sass/vendor'] {
    | errno: -13,
    | code: 'EACCES',
    | syscall: 'mkdir',
    | path: '/usr/lib/node_modules/@bigcommerce/stencil-cli/node_modules/@bigcommerce/node-sass/vendor'
    | }
    is there something I need to do?
    3 replies

    :point_up: Edit: New version released: https://github.com/nektos/act/releases/tag/v0.2.23


    nektos/act@a9fe038 Update images, fix extrapath (#723)
    nektos/act@a9295c9 Test fixups for Windows/Forks (#681)
    nektos/act@e5d4886 Refactor local, composite actions and run steps (#712)
    nektos/act@003c995 Support container removal at exit. Fixes #694) (#714)
    nektos/act@2261204 fix: wrong perms (#726)
    nektos/act@6550eb7 fix: update codecov action (again) (#731)
    nektos/act@05bce00 fix: update codecov action (#727)
    nektos/act@96a0564 fix: don't replace empty secrets (#725)
    nektos/act@33ccfa6 Switch to interface{} instead of map[string]... (#700)
    nektos/act@fa93f4d fix: update issue template (#722)
    nektos/act@6b4d359 Add support for container kernel capabilities (#716)
    nektos/act@8a9167d fix: avoid race condition by not running exec/start twice (#702)
    nektos/act@d794e2f Move actions path outside of workdir (#701)
    nektos/act@4900399 Add arm64/arm and capture all snapshots (#699)
    nektos/act@799098b feat: add option for custom socket path (#698)
    nektos/act@764263c Have List suggest -W for duplicate jobs (#691)
    nektos/act@60b9606 fix: use github auth token for pulling a repository (#693)
    nektos/act@29ea8cf Fix: GITHUB_PATH should prepend (#690)
    nektos/act@38f6dfb fix: use auth when fetching (same as with cloning) (#687)
    nektos/act@f571290 refactor: remove gotest.tools (#688)
    nektos/act@3e22b1b Fix typo (#685)
    nektos/act@ee05fb1 Add hint on ${{ github.token }} (#686)
    nektos/act@3db5037 fix: hide masked value (#668)
    nektos/act@ef0da2a Hotfix: Skip Checkout Regression (#680)
    nektos/act@aa68181 refactor: return more errors, add more tests (#679)

    Danny Staple

    Has anyone managed to get SuperLinter to run in act? I see the following problem trying:

    | 2021-06-15 10:11:59 [INFO]   Successfully found:[GITHUB_EVENT_PATH], value:[/var/run/act/workflow/event.json]
    | /action/lib/linter.sh: line 462: /var/run/act/workflow/event.json: No such file or directory
    | /action/lib/linter.sh: line 470: /var/run/act/workflow/event.json: No such file or directory
    | 2021-06-15 10:11:59 [ERROR]   Failed to get [GITHUB_ORG]!

    Superlinter is an action that uses a container.

    I tried a debug step:

          - run: |
              ls -l /var/run/act/workflow
              cat ${GITHUB_EVENT_PATH}

    And in this step, I was able to see that GITHUB_EVENT_PATH had the right setting, and was able to cat the file in question. It looks like it expects to pull GITHUB_ORG from the json file.

    5 replies
    Anton Patsev
    I try run act, but get error
    DEBU[0001] context env => map[ACT:true]
    DEBU[0001] Evaluating '!contains(github['event']['commits'][0]['message'], '[skip ci]')' instead of '!contains(github.event.commits[0].message, '[skip ci]')'
    ERRO[0001] Unable to interpolate string '${{!contains(github.event.commits[0].message, '[skip ci]')}}' - [TypeError: Cannot access member '0' of undefined]
    DEBU[0001] expression '${{!contains(github.event.commits[0].message, '[skip ci]')}}' evaluated to 'false'
    [Release/release] Skipping job 'release' due to '${{!contains(github.event.commits[0].message, '[skip ci]')}}'
    how fixed? Thanks!
    5 replies