Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Veck Hsiao
    @fbukevin

    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:

        steps:
          # 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?
    Thanks!

    2 replies
    yoanne2x
    @yoanne2x
    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
    Ryanv2
    @hackercat:matrix.org
    [m]

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

    Changelog

    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
    @dannystaple

    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: |
              env
              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
    @patsevanton
    Hello!
    I try run act, but get error
    nektos/act#736
    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
    Daniel Doubrovkine (dB.)
    @dblock
    Quick q: GitHub runs jobs as a user, not as root. Can I do this with act?
    7 replies
    (I have some tests that fail in my project if I run as root.)
    Josh Soref
    @jsoref
    1 reply
    Sandy Rogers
    @SandyRogers
    Hello! I am using act for a repo (call it me/childrepo), which locally I have checked out as a submodule of a parent repo. When I run act in childrepo, it obviously runs childrepo/.github/workflows/test.yml. However... the ${GITHUB_REF} set by act is refs/head/parentrepo-branch-name and ${GITHUB_REPOSITORY} is me/parentrepo. This is a problem because act provides a different github context to what github actions does (where ${GITHUB_REPOSITORY}=me/childrepo etc). Does anybody know if this is expected behaviour, or an issue? I saw a potentially related issue nektos/act#428 that has gone stale.
    3 replies
    Daniel Doubrovkine (dB.)
    @dblock
    Might be interesting to you, https://code.dblock.org/2021/06/15/running-github-actions-locally-using-act.html, from my yesterday's exploration.
    2 replies
    Victor Passapera
    @vpassapera
    Hello all, not sure exactly where to ask this, but when running act locally, it seems that any step I have that contains if: ${{ failure() }} is not honored, and the workflow fails without running any steps that have the failure clause
    is this a known issue? (It works on github but not act)
    Daniel Doubrovkine (dB.)
    @dblock
    We have 1 engine repo, and N plugin repositories. We're trying to build engine, then each plugin, then assemble everything in a .zip. Is writing a GitHub workflow that uses Act to call GitHub workflows of each plugin crazy?
    2 replies
    Victor Passapera
    @vpassapera

    Given the following workflow: https://github.com/PhpTyping/types/blob/master/.github/workflows/build-stable.yaml

    In act, I am able to trigger it.

    However, When i make a change that purposely fails unit tests, I expect the if: ${{ failure() }} step to run, and it is not. (https://github.com/PhpTyping/types/blob/master/.github/workflows/build-stable.yaml#L63)

    Is this normal behavior for act? It runs as expected on github, but act hard-fails and won't execute the steps following the failure (in say, unit tests) even if they have the if: ${{ failure() }} clause.
    Shots Of Freedom
    @ShotsOfFreedom__twitter

    Is there a way to test for conditions like this:

    on:
     pull_request:
       types: [closed]
       branches:
         - main 
    
    jobs:
      setup:
        if: github.event.action == 'closed' && github.event.pull_request.merged == true

    I'm not sure this ever got answered. I'm running act pull_request and this is running, but I would love to find a way to cause it to skip the workflow or trigger a "pull_request was created" action instead

    3 replies
    Victor Passapera
    @vpassapera
    No one can help with what I am asking about? I even looked at the tests and it seems like you're testing for those tokens.
    The local behavior is unexpected.
    jimyryan
    @jimyryan:matrix.org
    [m]

    Hello, I have issue with artifact-server, my pipeline crash :(
    I'm trying to do things describes in https://github.com/nektos/act/issues/329#issuecomment-854838927 without success :(
    About the npm server, I have setup it using npm ci && npm start. When I launch act, I export env varialbe export ACTIONS_CACHE_URL=localhost:8080 but I don't see any changes on my error :(

    Bellow, my error message:

    4 replies
    Austen
    @anovis

    i am having trouble getting a local action to run. i first tried running

       - name: goblet deploy
          uses: ./
          env:
            PROJECT: ${{ env.GCLOUD_PROJECT }}

    which errors with Error: invalid reference format

    when i tried

    - uses: actions/checkout@v2
          name: goblet deploy
          with:
            path: "goblet-github-actions"
          env:
            PROJECT: ${{ env.GCLOUD_PROJECT }}

    i got the Skipping local actions/checkout because workdir was already copied and my docker continer was not run.

    i verified that my dockerfile runs correctly on its own

    i am new to act so I am assuming i am just missing somethign small. appreciate the help

    Chunghyun Lee
    @sinna94

    Hi, I have trouble using act

    name: Java CI with Gradle
    
    on:
      push:
        branches: [ master, develop ]
      pull_request:
        branches: [ master, develop ]
    
    jobs:
      test:
    
        runs-on: ubuntu-latest
    
        steps:
          - uses: actions/checkout@v2
          - name: Set up JDK 11
            uses: actions/setup-java@v2
            with:
              java-version: '11'
              distribution: 'adopt'
          - name: Grant execute permission for gradlew
            run: chmod +x ./gradlew
          - run: ./gradlew test
          - name: Build with Gradle
            run: ./gradlew build
    [Java CI with Gradle/test]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/chunghyun/study/spring-boot-web-service/workflow/2] user=
    [Java CI with Gradle/test]   βœ…  Success - Grant execute permission for gradlew
    [Java CI with Gradle/test] ⭐  Run ./gradlew test
    [Java CI with Gradle/test]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/chunghyun/study/spring-boot-web-service/workflow/3] user=
    | /lib64/ld-linux-x86-64.so.2: No such file or directory
    [Java CI with Gradle/test]   ❌  Failure - ./gradlew test
    Error: exit with `FAILURE`: 255

    gradlew exists in that path.
    Is there something I need to set for the path?
    I use act version 0.2.23

    3 replies
    Dan H
    @volleynerd

    After playing with ACT for the first time yesterday, I think I'm finally understanding the general concepts and differences between (hoping this helps others just getting started)

    • BINDING the host source dir (with -b argument when run act) in which case all host source is there in the running container and therefore workflow can run against work-in-progress files (NOTE: in this case if you DO run checkout action, it will first delete everything there, which is going to nuke your files on the host), OR
    • not BINDING (the default) in which case you have a clean workspace in the container, and need to run checkout action (NOTE: in this case, you will not have any work-in-progress files from the host since they're coming from Git checkout)

    Please let me know if the above is correct, or what am I missing? Thank you.

    Now to figure out how to provide proper credentials/token to the checkout action. PAT not working...

    4 replies
    Kareem Kwong
    @kwngo

    i am having trouble getting a local action to run. i first tried running

       - name: goblet deploy
          uses: ./
          env:
            PROJECT: ${{ env.GCLOUD_PROJECT }}

    which errors with Error: invalid reference format

    when i tried

    - uses: actions/checkout@v2
          name: goblet deploy
          with:
            path: "goblet-github-actions"
          env:
            PROJECT: ${{ env.GCLOUD_PROJECT }}

    i got the Skipping local actions/checkout because workdir was already copied and my docker continer was not run.

    i verified that my dockerfile runs correctly on its own

    i am new to act so I am assuming i am just missing somethign small. appreciate the help

    Having this same issue :(

    2 replies
    mf-eqsdigital
    @mf-eqsdigital

    Hi guys,

    I've got this yml file

    name: API Test
    on:
    push:
    branches:

      - development

    pull_request:
    branches:

      - development

    jobs:
    api-test:
    name: API Test
    runs-on: ubuntu-20.04
    defaults:
    run:
    working-directory: ./
    steps:

      - name: Check out Git repository
        uses: actions/checkout@v2
    
      - name: Setup Go
        uses: actions/setup-go@v2
        with:
          go-version: '1.15'

    And since yesterday i get this error
    [API Test/API Test] ⭐ Run Setup Go
    time="2021-07-01T09:45:22+01:00" level=info msg=" ☁ git clone 'https://github.com/actions/setup-go' # ref=v2"
    [API Test/API Test] 🐳 docker cp src=C:\Users\oruam.cache\act/actions-setup-go@v2/ dst=/mnt/c/Users/oruam/Documents/_actions/actions-setup-go@v2/
    | OCI runtime exec failed: exec failed: container_linux.go:367: starting container process caused: exec: "node": executable file not found in $PATH: unknown
    [API Test/API Test] ❌ Failure - Setup Go
    Error: exit with FAILURE: 126

    I didn't change anything and start getting this error.. Anyone having the same issue?

    5 replies
    Ryanv2
    @hackercat:matrix.org
    [m]
    I've worked again a bit on GitHub runner repo and built successfully ubuntu-20.04 from packer template, source here: https://github.com/catthehacker/virtual-environments/tree/full-20.04-dev
    will need to do cleanup of it, but it looks like it might work, tests and software report have been removed because they fail all the time because of those stupid environment variables (todo: fix), removed: mysql, postgresql as they slow down or outright fail build, there might be some other stuff removed, look at commit log. Image is uploading catthehacker/ubuntu:full-20.04-dev size: ~40GB.
    AgustΓ­n Gonzalez Nicolini
    @bananitadolca
    Hey! did anyone solve the issue when getting "git: command not found" ?
    yuko fuyutsuki
    @fuyutsuki
    Hi there, how to resolve this?
    time="2021-07-10T17:13:51+09:00" level=debug msg="Evaluating 'Boolean(contains(github['event']['head_commit']['message'], '[skip ci]') == false)' instead of 'Boolean(contains(github.event.head_commit.message, '[skip ci]') == false)'"
    time="2021-07-10T17:13:51+09:00" level=debug msg="Loading slug from git directory 'D:\\Repository\\test-actions\\.git'"
    [dev/Prepare PHP         ]   ❌  Error in if: expression - Prepare PHP
    2 replies
    Matan Shukry
    @matanshukry
    hey guys, I can't seem to run act for the first time on windows. it shows the "choose the default image" question but immediately quits without waiting for input. I tried both git for bash and cmd.
    Any ideas?
    9 replies
    Matan Shukry
    @matanshukry
    image.png
    image.png
    image.png
    image.png
    Max
    @dopey
    Hey :wave: , just starting out with act. I'm seeing FATA[0000] yaml: unmarshal errors: line 3: cannot unmarshal !!map into string any time I run an act command. Did a brief look online and couldn't find any obviously related issues.
    14 replies
    Tez Lopchan
    @tezlopchan
    Screen Shot 2021-07-19 at 3.36.29 PM.png
    Estellise Yukihime
    @estellise-yukihime
    Hi, is there any way to download the build file generated by the workflow?
    6 replies
    Ryanv2
    @hackercat:matrix.org
    [m]
    automated builds for those massive docker images including all tools from github actions are now here: https://github.com/catthehacker/virtual-environments/runs/3138234311
    1 reply
    Estellise Yukihime
    @estellise-yukihime
    image.png
    image.png
    Is this a problem with the container size?
    Estellise Yukihime
    @estellise-yukihime
    image.png
    I scroll up, but couldn't find anything the could likely cause the build error
    lubyou
    @lubyou

    Hi,
    with catthehacker/ubuntu:act-latest, I am getting
    OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "node": executable file not found in $PATH: unknown

    Inside the container, I can see that node exists at /opt/hostedtoolcache/node/14.17.3/x64/bin/node, but PATH does not include said directory.

    I tried act -W .github/workflows/master.yml -P ubuntu-20.04=catthehacker/ubuntu:act-20.04-20210620 --pull, but get the same error.

    Any suggestions?
    Thank you

    25 replies
    lubyou
    @lubyou
    are there any clever workarounds for nektos/act#329
    7 replies