Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 05 09:10
    @catthehacker banned @1948_your_tlv_homo_1488:swirl.funny.cl
Timothy J Laurent
@timothyjlaurent

Turns out that the ~/.actrc / ./.actrc needs to be one parameter per line.

-P self-hosted=ghcr.io/catthehacker/ubuntu:act-20.04
-P dev=ghcr.io/catthehacker/ubuntu:act-20.04

Maybe I'm confusing the issues I had with the container: param?

So here's a summary of the issues I've encountered.

  • Using the container parameter will override whatever is in the runs-on
  • Docker-based actions aren't working - eg java not found on JVM image.
Error: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "java": executable file not found in $PATH: unknown

Is there some way to enable these features on Act?

2 replies
Tomasz Dłuski
@Toumash

Is it possible to run node14 in act? I can only see node12 images. When running some yarn cli ive got following error

Publish in Chrome Web Store/publish] ⭐  Run Install chrome web store cli
yarn global v1.22.5
warning package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
error chrome-webstore-upload-cli@2.0.1: The engine "node" is incompatible with this module. Expected version "^14.13.1 || >=16.0.0". Got "12.20.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
[Publish in Chrome Web Store/publish]   ❌  Failure - Install chrome web store cli

but I do have

- name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v2
      with:
        node-version: 14.x
2 replies
ged
@gedw99
I want to get off github but still use my workflows . What i dont see is how i can do builds on wi diws mac and linux cause the Act system currentky uses Docker . Am i missing something ?? ?
1 reply
Josh Soref
@jsoref
when I try to run make in nektos/act, I get a bunch of build failures, is that expected? :-(
1 reply
especially github/super-linter (action-linter / shellcheck) seems to hate .github/workflows/checks.yml -- and while I can fix some of the complaints, I can't fix all of them
Also, for reasons... the PATH var appears to be quite buggy in the tests https://www.irccloud.com/pastebin/jhdROhkM/
1 reply
jsoref @jsoref stubs foot on fmt.Printf or some relative https://www.irccloud.com/pastebin/S0q05GtQ/
Kingdon Barrett
@kingdonb
Greetings, I am trying to understand why my github actions workflow does not work in act and so far I've tried a few things. I got to the point where RUNNER_WORKSPACE is raised as an undefined variable since my action includes it in an entrypoint.sh, and I was searching for the meaning of that variable and came up somewhat empty on understanding.
So far I have figured out that since my action writes back to the GITHUB_WORKSPACE, I need to start act with -b for bind mode instead of copy, else I get Permission Denied creating the "bin" dir. I tried changing the script entrypoint.sh to just don't call RUNNER_WORKSPACE anymore, and it didn't seem to have any effect.
Colin Alworth
@niloc132
@kingdonb share your command/yml? (i know there is a permission denied issue with the full-latest tagged image)
(I have messed with the actions/tools in some ways that I think haven't helped in the main branch, this is the original "actions/tools")
I'm using act compiled from the main branch today
Colin Alworth
@niloc132
what is your act command/configs?
Kingdon Barrett
@kingdonb
~/go/bin/act -b --privileged
3 replies
Kingdon Barrett
@kingdonb
~/.actrc looks like it was generated, it is the defaults:
-P ubuntu-latest=catthehacker/ubuntu:act-latest
-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
ubuntu-16.04=catthehacker/ubuntu:act-16.04
are there any caches which I can clean if it looks like my latest changes in current directory are for some reason not reflected in the running act behavior
5 replies
Kingdon Barrett
@kingdonb
(line 28 no longer refers to RUNNER_WORKSPACE but I still get:
| /entrypoint.sh: line 28: RUNNER_WORKSPACE: unbound variable)
Szymon Nowak
@szimek
Hi! I got a question related to 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.
Callum Tait
@toast-gear
hello people, I have an error using act which is happening because the container I am using in my workflow does not have bash, it's na alpine image
I think anyway
my workflow looks like:
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
and my act after issuing 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
Callum Tait
@toast-gear
yeh, if I remove the container and do it directly in the image then the failed to find bash disappears
2 replies
Markus Wolf
@KnisterPeter
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.
23 replies
Erik Brown
@erikebrown

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?

14 replies
Martin K. Scherer
@marscher
Hi, just installed git version via AUR on Arch and getting a "zero" value error directly after choosing the image. I've searched the issue list on Github and there was a similar error, but in a submenu. This seems to affect the whole image selection thing. Should I just go a head and create a new issue, or does somebody here want to take a look at some logs first?
1 reply
I can only reproduce this in a certain repo containing a more or less complex matrix. Eventually this is the cause. Is it fine to reference this repo/commit hash in the issue or should I try to identify a minimum "working" example?
1 reply
Ryan
@catthehacker
image.png
Uddhav Raut
@uddhavraut:matrix.org
[m]
I download act_Windows_x86_64 and I need command to install ?
1 reply
Tanul
@smartaquarius10
Hello, I have nothing related to docker in my workflow or actions still it is trying to run docker pull and getting access denied as nothing is there on docker.io
Any suggestions please
1 reply
As far ask I know act just run the action and push the publication to docker. Why it is checking anything on docker.io etc.
1 reply
tobon4
@tobon4:matrix.org
[m]

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:

  • name: Login to Azure
    uses: azure/login@v1
    with:
    creds: ${{ secrets.SP_CREDS }}

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?

3 replies
Ryan
@catthehacker
3 replies
Ryan
@catthehacker
Also funny thing, GitHub mentioned 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
Ryan
@catthehacker
I'm through first stage of ripping out current workflow parser and replacing it with actionlint
24 replies
Mathijs van Veluw
@BlackDex
using act the matrix is only running the first 4 items
Is that something which can be configured
13 replies
Or is this a bug?
Luigi Teschio
@gigitux_twitter

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!

5 replies
Josh Soref
@jsoref
I'm trying to use act in a github workflow and the act installer is interactively asking me which configuration to use.
James Robinson
@jemrobinson

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?

1 reply
Krystian Marek
@KrystianMarek

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]

1 reply
Yury-Fridlyand
@Yury-Fridlyand

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.

4 replies
Kyle Tozer
@kyletozer
I'm having trouble installing via the bash command: curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash. I'm on ubuntu 20.04 lts and the command just hangs in the terminal when i try running it.
2 replies
David Brumley
@dbrumley
Hi everyone :wave: I'm trying to build someone elses repository and save the results as a docker image. is that possible to do with act? I have successfully built their repo using act on my computer from their action, but not sure how to go about saving the docker image.
5 replies
Kevin E Hosford
@kevinehosford
I just got started with act and can't seem to get past FATA[0000] Unable to build dependency graph! in a repo that has working actions
6 replies
Kevin E Hosford
@kevinehosford
Doing a first run and using the Large default runner I ultimately get Error: Error response from daemon: No such image: ghcr.io/catthehacker/ubuntu:full-20.04
4 replies
Toby
@tobyhijzen

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.

9 replies