nektos/act

Issue: exec: "node": executable file not found in $PATH: unknown

grahamb opened this issue · 17 comments

System information

  • Operating System: RHEL 7
  • Architecture: x64
  • Apple M1: no
  • Docker version: 20.10.10
  • Docker image used in act: ghcr.io/catthehacker/ubuntu:act-latest
  • act version: 0.2.25

~/.actrc contents:

-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
-P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04

Expected behaviour

A workflow that includes actions/setup-node@v2 should successfully install the desired version of NodeJS

Actual behaviour

The actions/setup-node@v2 action fails with an error: exec: "node": executable file not found in $PATH: unknown

Possible duplicate of #834

Workflow and/or repository

Sample repo: https://github.com/grahamb/node-actions-test

workflow
name: Node Test
on: workflow_dispatch
jobs:
  setup-node:
    runs-on: [ubuntu-latest]
    container:
      image: centos:7
    steps:
      - uses: actions/setup-node@v2
        with:
          node-version: '14'
      - uses: actions/checkout@v2
      - run: cat README.md

Steps to reproduce

  1. Clone sample repo: https://github.com/grahamb/node-actions-test
  2. Enter cloned repo directory
  3. Run act workflow_dispatch

act output

Log
DEBU[0000] Loading environment from /home/grahamb/code/node-actions-test/.env
DEBU[0000] Loading secrets from /home/grahamb/code/node-actions-test/.secrets
DEBU[0000] Loading workflows from '/home/grahamb/code/node-actions-test/.github/workflows'
DEBU[0000] Loading workflows recursively
DEBU[0000] Found workflow 'main.yml' in '/home/grahamb/code/node-actions-test/.github/workflows/main.yml'
DEBU[0000] Reading workflow '/home/grahamb/code/node-actions-test/.github/workflows/main.yml'
DEBU[0000] Correcting if statements '/home/grahamb/code/node-actions-test/.github/workflows/main.yml'
DEBU[0000] Planning event: workflow_dispatch
DEBU[0000] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0000] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0000] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0000] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0000] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0000] using github ref: refs/heads/main
DEBU[0000] context env => map[ACT:true https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0000] context needs => map[]
[Node Test/setup-node] 🚀  Start image=centos:7
DEBU[0000] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0000] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0000] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0000] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0000] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0000] using github ref: refs/heads/main
[Node Test/setup-node]   🐳  docker pull image=centos:7 platform= username= forcePull=false
[Node Test/setup-node]   🐳  docker pull centos:7
DEBU[0000] Image exists? true
[Node Test/setup-node] Removed container: c9760665d91384f3498ec05c91d1d60418565c577081600db0c173d7f9d51c57
[Node Test/setup-node]   🐳  docker volume rm act-Node-Test-setup-node
[Node Test/setup-node]   🐳  docker create image=centos:7 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Node Test/setup-node] Created container name=act-Node-Test-setup-node id=b8962899592c80610e26655126298cd5f5fd21b472dbf7adb5316a519cf6dbd2 from image centos:7 (platform: )
[Node Test/setup-node] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_TEMP=/tmp]
[Node Test/setup-node]   🐳  docker run image=centos:7 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Node Test/setup-node] Starting container: b8962899592c80610e26655126298cd5f5fd21b472dbf7adb5316a519cf6dbd2
[Node Test/setup-node] Started container: b8962899592c80610e26655126298cd5f5fd21b472dbf7adb5316a519cf6dbd2
[Node Test/setup-node]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir=
[Node Test/setup-node] Exec command '[mkdir -m 0777 -p /var/run/act]'
[Node Test/setup-node] Working directory '/home/grahamb/code/node-actions-test'
[Node Test/setup-node]   🐳  docker cp src=/home/grahamb/code/node-actions-test/. dst=/home/grahamb/code/node-actions-test
[Node Test/setup-node]   🐳  docker exec cmd=[mkdir -p /home/grahamb/code/node-actions-test] user= workdir=
[Node Test/setup-node] Exec command '[mkdir -p /home/grahamb/code/node-actions-test]'
[Node Test/setup-node] Working directory '/home/grahamb/code/node-actions-test'
DEBU[0001] Writing tarball /tmp/act561991983 from /home/grahamb/code/node-actions-test/.
DEBU[0001] Stripping prefix:/home/grahamb/code/node-actions-test/ src:/home/grahamb/code/node-actions-test/.
[Node Test/setup-node] Extracting content from '/tmp/act561991983' to '/home/grahamb/code/node-actions-test'
DEBU[0001] Writing entry to tarball workflow/event.json len:2
DEBU[0001] Writing entry to tarball workflow/envs.txt len:0
DEBU[0001] Writing entry to tarball workflow/paths.txt len:0
[Node Test/setup-node] Extracting content to '/var/run/act/'
DEBU[0001] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0001] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0001] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0001] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0001] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0001] using github ref: refs/heads/main
DEBU[0001] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0001] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0001] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0001] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0001] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0001] using github ref: refs/heads/main
DEBU[0001] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0001] context needs => map[]
DEBU[0001] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0001] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0001] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0001] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0001] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0001] using github ref: refs/heads/main
DEBU[0001] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0001] context needs => map[]
DEBU[0001] context env => map[ACT:true CI:true GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:workflow_dispatch GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:setup-node GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:grahamb/node-actions-test GITHUB_REPOSITORY_OWNER:grahamb GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:b4c5c57037198e108813bbd93f5cb1881b08759c GITHUB_TOKEN: GITHUB_WORKFLOW:Node Test GITHUB_WORKSPACE:/home/grahamb/code/node-actions-test INPUT_NODE-VERSION:14 ImageOS:ubuntu20 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: https_proxy:http://PROXY_URL_REDACTED:8080]
[Node Test/setup-node] setupEnv => map[ACT:true CI:true GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:workflow_dispatch GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:setup-node GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:grahamb/node-actions-test GITHUB_REPOSITORY_OWNER:grahamb GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:b4c5c57037198e108813bbd93f5cb1881b08759c GITHUB_TOKEN: GITHUB_WORKFLOW:Node Test GITHUB_WORKSPACE:/home/grahamb/code/node-actions-test INPUT_NODE-VERSION:14 ImageOS:ubuntu20 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: https_proxy:http://PROXY_URL_REDACTED:8080]
[Node Test/setup-node] ⭐  Run actions/setup-node@v2
DEBU[0001] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0001] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0001] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0001] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0001] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0001] using github ref: refs/heads/main
INFO[0001]   ☁  git clone 'https://github.com/actions/setup-node' # ref=v2
DEBU[0001]   cloning https://github.com/actions/setup-node to /home/grahamb/.cache/act/actions-setup-node@v2
DEBU[0002] Unable to pull refs/heads/v2: worktree contains unstaged changes
DEBU[0002] Cloned https://github.com/actions/setup-node to /home/grahamb/.cache/act/actions-setup-node@v2
DEBU[0002] Checked out v2
DEBU[0002] Read action &{Setup Node.js environment GitHub Setup a Node.js environment by adding problem matchers and optionally downloading and adding it to the PATH map[always-auth:{Set always-auth in npmrc false false} architecture:{Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default. false } cache:{Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm false } cache-dependency-path:{Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies. false } check-latest:{Set this option if you want the action to check for the latest available version that satisfies the version spec false false} node-version:{Version Spec of the version to use.  Examples: 12.x, 10.15.1, >=10.15.0 false } node-version-file:{File containing the version Spec of the version to use.  Examples: .nvmrc, .node-version false } registry-url:{Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN false } scope:{Optional scope for authenticating against scoped registries false } token:{Used to pull node distributions from node-versions.  Since there's a default, this is typically not supplied by the user. false ${{ github.token }}} version:{Deprecated. Use node-version instead. Will not be supported after October 1, 2019 false }] map[cache-hit:{A boolean value to indicate if a cache was hit }] {node12 map[] dist/setup/index.js   [] []} { }} from 'Unknown'
DEBU[0002] About to run action &{Setup Node.js environment GitHub Setup a Node.js environment by adding problem matchers and optionally downloading and adding it to the PATH map[always-auth:{Set always-auth in npmrc false false} architecture:{Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default. false } cache:{Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm false } cache-dependency-path:{Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies. false } check-latest:{Set this option if you want the action to check for the latest available version that satisfies the version spec false false} node-version:{Version Spec of the version to use.  Examples: 12.x, 10.15.1, >=10.15.0 false } node-version-file:{File containing the version Spec of the version to use.  Examples: .nvmrc, .node-version false } registry-url:{Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN false } scope:{Optional scope for authenticating against scoped registries false } token:{Used to pull node distributions from node-versions.  Since there's a default, this is typically not supplied by the user. false ${{ github.token }}} version:{Deprecated. Use node-version instead. Will not be supported after October 1, 2019 false }] map[cache-hit:{A boolean value to indicate if a cache was hit }] {node12 map[] dist/setup/index.js   [] []} { }}
DEBU[0002] Evaluating 'github['token']' instead of 'github.token'
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Evaluating 'github['token']' instead of 'github.token'
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
DEBU[0002] context env => map[ACT:true CI:true GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:workflow_dispatch GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:setup-node GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:grahamb/node-actions-test GITHUB_REPOSITORY_OWNER:grahamb GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:b4c5c57037198e108813bbd93f5cb1881b08759c GITHUB_TOKEN: GITHUB_WORKFLOW:Node Test GITHUB_WORKSPACE:/home/grahamb/code/node-actions-test INPUT_ALWAYS-AUTH:false INPUT_ARCHITECTURE: INPUT_CACHE: INPUT_CACHE-DEPENDENCY-PATH: INPUT_CHECK-LATEST:false INPUT_NODE-VERSION:14 INPUT_NODE-VERSION-FILE: INPUT_REGISTRY-URL: INPUT_SCOPE: INPUT_TOKEN: INPUT_VERSION: ImageOS:ubuntu20 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] type=3 actionDir=/home/grahamb/.cache/act/actions-setup-node@v2 actionPath= workdir=/home/grahamb/code/node-actions-test actionCacheDir=/home/grahamb/.cache/act actionName=actions-setup-node@v2 containerActionDir=/var/run/act/actions/actions-setup-node@v2
DEBU[0002] Removing /home/grahamb/.cache/act/actions-setup-node@v2/.gitignore before docker cp
DEBU[0002] /var/run/act/actions/actions-setup-node@v2
[Node Test/setup-node]   🐳  docker cp src=/home/grahamb/.cache/act/actions-setup-node@v2/ dst=/var/run/act/actions/actions-setup-node@v2/
[Node Test/setup-node]   🐳  docker exec cmd=[mkdir -p /var/run/act/actions/actions-setup-node@v2/] user= workdir=
[Node Test/setup-node] Exec command '[mkdir -p /var/run/act/actions/actions-setup-node@v2/]'
[Node Test/setup-node] Working directory '/home/grahamb/code/node-actions-test'
DEBU[0002] Writing tarball /tmp/act3994824173 from /home/grahamb/.cache/act/actions-setup-node@v2/
DEBU[0002] Stripping prefix:/home/grahamb/.cache/act/actions-setup-node@v2/ src:/home/grahamb/.cache/act/actions-setup-node@v2/
[Node Test/setup-node] Extracting content from '/tmp/act3994824173' to '/var/run/act/actions/actions-setup-node@v2/'
DEBU[0002] executing remote job container: [node /var/run/act/actions/actions-setup-node@v2/dist/setup/index.js]
[Node Test/setup-node]   🐳  docker exec cmd=[node /var/run/act/actions/actions-setup-node@v2/dist/setup/index.js] user= workdir=
[Node Test/setup-node] Exec command '[node /var/run/act/actions/actions-setup-node@v2/dist/setup/index.js]'
[Node Test/setup-node] Working directory '/home/grahamb/code/node-actions-test'
| OCI runtime exec failed: exec failed: container_linux.go:370: starting container process caused: exec: "node": executable file not found in $PATH: unknown
[Node Test/setup-node]   ❌  Failure - actions/setup-node@v2
DEBU[0002] exit with `FAILURE`: 126
DEBU[0002] exit with `FAILURE`: 126
DEBU[0002] exit with `FAILURE`: 126
DEBU[0002] Loading slug from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] Loading revision from git directory '/home/grahamb/code/node-actions-test/.git'
DEBU[0002] Found revision: b4c5c57037198e108813bbd93f5cb1881b08759c
DEBU[0002] HEAD points to 'b4c5c57037198e108813bbd93f5cb1881b08759c'
DEBU[0002] using github ref: refs/heads/main
DEBU[0002] context env => map[ACT:true PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin https_proxy:http://PROXY_URL_REDACTED:8080]
DEBU[0002] context needs => map[]
Error: exit with `FAILURE`: 126

Additional information

This workflow works normally on a github.com hosted runner:

Log
2022-01-27T18:11:12.3695888Z Waiting for a runner to pick up this job...
2022-01-27T18:11:13.8017610Z Job is waiting for a hosted runner to come online.
2022-01-27T18:11:17.0598673Z Job is about to start running on the hosted runner: Hosted Agent (hosted)
2022-01-27T18:11:20.9562089Z Current runner version: '2.286.1'
2022-01-27T18:11:20.9587471Z ##[group]Operating System
2022-01-27T18:11:20.9587966Z Ubuntu
2022-01-27T18:11:20.9588202Z 20.04.3
2022-01-27T18:11:20.9588571Z LTS
2022-01-27T18:11:20.9588823Z ##[endgroup]
2022-01-27T18:11:20.9589170Z ##[group]Virtual Environment
2022-01-27T18:11:20.9589498Z Environment: ubuntu-20.04
2022-01-27T18:11:20.9589834Z Version: 20220123.1
2022-01-27T18:11:20.9590648Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20220123.1/images/linux/Ubuntu2004-Readme.md
2022-01-27T18:11:20.9591274Z Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20220123.1
2022-01-27T18:11:20.9591743Z ##[endgroup]
2022-01-27T18:11:20.9592062Z ##[group]Virtual Environment Provisioner
2022-01-27T18:11:20.9592456Z 1.0.0.0-main-20211214-1
2022-01-27T18:11:20.9592720Z ##[endgroup]
2022-01-27T18:11:20.9593734Z ##[group]GITHUB_TOKEN Permissions
2022-01-27T18:11:20.9594353Z Actions: write
2022-01-27T18:11:20.9594784Z Checks: write
2022-01-27T18:11:20.9595214Z Contents: write
2022-01-27T18:11:20.9595489Z Deployments: write
2022-01-27T18:11:20.9595820Z Discussions: write
2022-01-27T18:11:20.9596135Z Issues: write
2022-01-27T18:11:20.9596392Z Metadata: read
2022-01-27T18:11:20.9596747Z Packages: write
2022-01-27T18:11:20.9597011Z Pages: write
2022-01-27T18:11:20.9597326Z PullRequests: write
2022-01-27T18:11:20.9597637Z RepositoryProjects: write
2022-01-27T18:11:20.9597992Z SecurityEvents: write
2022-01-27T18:11:20.9598315Z Statuses: write
2022-01-27T18:11:20.9598630Z ##[endgroup]
2022-01-27T18:11:20.9602258Z Secret source: Actions
2022-01-27T18:11:20.9602697Z Prepare workflow directory
2022-01-27T18:11:21.0703506Z Prepare all required actions
2022-01-27T18:11:21.0887652Z Getting action download info
2022-01-27T18:11:21.2584335Z Download action repository 'actions/setup-node@v2' (SHA:1f8c6b94b26d0feae1e387ca63ccbdc44d27b561)
2022-01-27T18:11:21.5703477Z Download action repository 'actions/checkout@v2' (SHA:ec3a7ce113134d7a93b817d10a8272cb61118579)
2022-01-27T18:11:21.8920811Z ##[group]Checking docker version
2022-01-27T18:11:21.8935805Z ##[command]/usr/bin/docker version --format '{{.Server.APIVersion}}'
2022-01-27T18:11:22.0892805Z '1.41'
2022-01-27T18:11:22.0934577Z Docker daemon API version: '1.41'
2022-01-27T18:11:22.0935054Z ##[command]/usr/bin/docker version --format '{{.Client.APIVersion}}'
2022-01-27T18:11:22.1506345Z '1.41'
2022-01-27T18:11:22.1528851Z Docker client API version: '1.41'
2022-01-27T18:11:22.1535404Z ##[endgroup]
2022-01-27T18:11:22.1535764Z ##[group]Clean up resources from previous jobs
2022-01-27T18:11:22.1541621Z ##[command]/usr/bin/docker ps --all --quiet --no-trunc --filter "label=84217e"
2022-01-27T18:11:22.1893869Z ##[command]/usr/bin/docker network prune --force --filter "label=84217e"
2022-01-27T18:11:22.2182750Z ##[endgroup]
2022-01-27T18:11:22.2183081Z ##[group]Create local container network
2022-01-27T18:11:22.2193827Z ##[command]/usr/bin/docker network create --label 84217e github_network_b6e486242d86445ebc4f3d2c80e2bf5d
2022-01-27T18:11:22.2891593Z 877033d351e64c4a083e771169c5e8092211ef53640328605bd7fc0361977c25
2022-01-27T18:11:22.2915760Z ##[endgroup]
2022-01-27T18:11:22.3032461Z ##[group]Starting job container
2022-01-27T18:11:22.3047083Z ##[command]/usr/bin/docker pull centos:7
2022-01-27T18:11:22.5289630Z 7: Pulling from library/centos
2022-01-27T18:11:22.5791540Z 2d473b07cdd5: Pulling fs layer
2022-01-27T18:11:23.0640243Z 2d473b07cdd5: Verifying Checksum
2022-01-27T18:11:23.0640676Z 2d473b07cdd5: Download complete
2022-01-27T18:11:25.7263078Z 2d473b07cdd5: Pull complete
2022-01-27T18:11:25.7304488Z Digest: sha256:9d4bcbbb213dfd745b58be38b13b996ebb5ac315fe75711bd618426a630e0987
2022-01-27T18:11:25.7323870Z Status: Downloaded newer image for centos:7
2022-01-27T18:11:25.7348146Z docker.io/library/centos:7
2022-01-27T18:11:25.7435161Z ##[command]/usr/bin/docker create --name 70cd964e11284358be20120f416bfce0_centos7_4cc77c --label 84217e --workdir /__w/node-actions-test/node-actions-test --network github_network_b6e486242d86445ebc4f3d2c80e2bf5d  -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work":"/__w" -v "/home/runner/runners/2.286.1/externals":"/__e":ro -v "/home/runner/work/_temp":"/__w/_temp" -v "/home/runner/work/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" --entrypoint "tail" centos:7 "-f" "/dev/null"
2022-01-27T18:11:27.2251480Z 2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e
2022-01-27T18:11:27.2280481Z ##[command]/usr/bin/docker start 2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e
2022-01-27T18:11:27.5670393Z 2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e
2022-01-27T18:11:27.5711296Z ##[command]/usr/bin/docker ps --all --filter id=2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e --filter status=running --no-trunc --format "{{.ID}} {{.Status}}"
2022-01-27T18:11:27.5976777Z 2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e Up Less than a second
2022-01-27T18:11:27.6001253Z ##[command]/usr/bin/docker inspect --format "{{range .Config.Env}}{{println .}}{{end}}" 2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e
2022-01-27T18:11:27.6291021Z HOME=/github/home
2022-01-27T18:11:27.6292918Z GITHUB_ACTIONS=true
2022-01-27T18:11:27.6293537Z CI=true
2022-01-27T18:11:27.6294325Z PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2022-01-27T18:11:27.6318159Z ##[endgroup]
2022-01-27T18:11:27.6318509Z ##[group]Waiting for all services to be ready
2022-01-27T18:11:27.6320385Z ##[endgroup]
2022-01-27T18:11:27.6719067Z ##[group]Run actions/setup-node@v2
2022-01-27T18:11:27.6719340Z with:
2022-01-27T18:11:27.6719544Z   node-version: 14
2022-01-27T18:11:27.6719744Z   always-auth: false
2022-01-27T18:11:27.6719958Z   check-latest: false
2022-01-27T18:11:27.6720406Z   token: ***
2022-01-27T18:11:27.6720620Z ##[endgroup]
2022-01-27T18:11:27.6850984Z ##[command]/usr/bin/docker exec  2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e sh -c "cat /etc/*release | grep ^ID"
2022-01-27T18:11:28.1398841Z Found in cache @ /__t/node/14.18.3/x64
2022-01-27T18:11:28.1752040Z ##[group]Run actions/checkout@v2
2022-01-27T18:11:28.1752251Z with:
2022-01-27T18:11:28.1752476Z   repository: grahamb/node-actions-test
2022-01-27T18:11:28.1752898Z   token: ***
2022-01-27T18:11:28.1753080Z   ssh-strict: true
2022-01-27T18:11:28.1753299Z   persist-credentials: true
2022-01-27T18:11:28.1753680Z   clean: true
2022-01-27T18:11:28.1754129Z   fetch-depth: 1
2022-01-27T18:11:28.1754391Z   lfs: false
2022-01-27T18:11:28.1754580Z   submodules: false
2022-01-27T18:11:28.1754778Z ##[endgroup]
2022-01-27T18:11:28.1759554Z ##[command]/usr/bin/docker exec  2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e sh -c "cat /etc/*release | grep ^ID"
2022-01-27T18:11:28.5030769Z Syncing repository: grahamb/node-actions-test
2022-01-27T18:11:28.5032981Z ##[group]Getting Git version info
2022-01-27T18:11:28.5033627Z Working directory is '/__w/node-actions-test/node-actions-test'
2022-01-27T18:11:28.5085327Z ##[endgroup]
2022-01-27T18:11:28.5088309Z Deleting the contents of '/__w/node-actions-test/node-actions-test'
2022-01-27T18:11:28.5099631Z The repository will be downloaded using the GitHub REST API
2022-01-27T18:11:28.5100107Z To create a local Git repository instead, add Git 2.18 or higher to the PATH
2022-01-27T18:11:28.5100413Z Downloading the archive
2022-01-27T18:11:28.5387254Z (node:41) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
2022-01-27T18:11:28.7688193Z Writing archive to disk
2022-01-27T18:11:28.7693124Z Extracting the archive
2022-01-27T18:11:28.7712200Z [command]/usr/bin/tar xz -C /__w/node-actions-test/node-actions-test/651acb5d-4d20-420c-8b4e-3d551ba66610 -f /__w/node-actions-test/node-actions-test/651acb5d-4d20-420c-8b4e-3d551ba66610.tar.gz
2022-01-27T18:11:28.7781534Z Resolved version grahamb-node-actions-test-b4c5c57037198e108813bbd93f5cb1881b08759c
2022-01-27T18:11:28.7968408Z ##[group]Run cat README.md
2022-01-27T18:11:28.7968680Z �[36;1mcat README.md�[0m
2022-01-27T18:11:28.7971610Z shell: sh -e {0}
2022-01-27T18:11:28.7971803Z ##[endgroup]
2022-01-27T18:11:28.9147430Z # node-actions-test
2022-01-27T18:11:28.9188376Z Post job cleanup.
2022-01-27T18:11:28.9192994Z ##[command]/usr/bin/docker exec  2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e sh -c "cat /etc/*release | grep ^ID"
2022-01-27T18:11:29.2932576Z Post job cleanup.
2022-01-27T18:11:29.2935901Z ##[command]/usr/bin/docker exec  2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e sh -c "cat /etc/*release | grep ^ID"
2022-01-27T18:11:29.6106589Z Stop and remove container: 70cd964e11284358be20120f416bfce0_centos7_4cc77c
2022-01-27T18:11:29.6115610Z ##[command]/usr/bin/docker rm --force 2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e
2022-01-27T18:11:29.8024684Z 2e4d78f4dd3229a7bc3c96494a7ece834d89669155f2b14b069b4b1c1ae2d26e
2022-01-27T18:11:29.8062250Z Remove container network: github_network_b6e486242d86445ebc4f3d2c80e2bf5d
2022-01-27T18:11:29.8067749Z ##[command]/usr/bin/docker network rm github_network_b6e486242d86445ebc4f3d2c80e2bf5d
2022-01-27T18:11:29.9155884Z github_network_b6e486242d86445ebc4f3d2c80e2bf5d
2022-01-27T18:11:29.9298589Z Cleaning up orphan processes

This action also works fine on a self-hosted runner (a RHEL7 with only Docker 20.10.6 installed, node is not installed on the host):

Modified self-hosted workflow file:

workflow
name: Node Test
on: workflow_dispatch
jobs:
  setup-node:
    runs-on: [self-hosted]
    container: 
      image: centos:7
    steps:
      - uses: actions/setup-node@v2
        with: 
          node-version: '14'
      - uses: actions/checkout@v2
      - run: cat README.md
output
2022-01-27T18:07:42.5408918Z Found online and idle self-hosted runner in the current repository's organization account that matches the required labels: 'self-hosted'
2022-01-27T18:07:42.5813423Z Waiting for the runner to pick up this job...
2022-01-27T18:07:42.9414854Z Job is about to start running on the runner: lcp-ghrun-lp01 (organization)
2022-01-27T18:07:48.2815162Z Current runner version: '2.284.0'
2022-01-27T18:07:48.2822164Z Runner name: 'lcp-ghrun-lp01'
2022-01-27T18:07:48.2822883Z Runner group name: 'Default'
2022-01-27T18:07:48.2824429Z Machine name: 'lcp-ghrun-lp01'
2022-01-27T18:07:48.2827807Z ##[group]GITHUB_TOKEN Permissions
2022-01-27T18:07:48.2829300Z Actions: write
2022-01-27T18:07:48.2829828Z Checks: write
2022-01-27T18:07:48.2830322Z Contents: write
2022-01-27T18:07:48.2830974Z Deployments: write
2022-01-27T18:07:48.2831479Z Discussions: write
2022-01-27T18:07:48.2832051Z Issues: write
2022-01-27T18:07:48.2832500Z Metadata: read
2022-01-27T18:07:48.2833085Z Packages: write
2022-01-27T18:07:48.2833597Z Pages: write
2022-01-27T18:07:48.2834085Z PullRequests: write
2022-01-27T18:07:48.2834745Z RepositoryProjects: write
2022-01-27T18:07:48.2835366Z SecurityEvents: write
2022-01-27T18:07:48.2836050Z Statuses: write
2022-01-27T18:07:48.2836646Z ##[endgroup]
2022-01-27T18:07:48.2841112Z Runner is running behind proxy server 'http://PROXY_URL_REDACTED:8080' for all HTTPS requests.
2022-01-27T18:07:48.2842390Z Prepare workflow directory
2022-01-27T18:07:48.3707881Z Prepare all required actions
2022-01-27T18:07:48.3720248Z Getting action download info
2022-01-27T18:07:48.6532838Z Download action repository 'actions/setup-node@v2' (SHA:270253e841af726300e85d718a5f606959b2903c)
2022-01-27T18:07:49.1534252Z Download action repository 'actions/checkout@v2' (SHA:5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f)
2022-01-27T18:07:50.1633306Z ##[group]Checking docker version
2022-01-27T18:07:50.1642043Z ##[command]/bin/docker version --format '{{.Server.APIVersion}}'
2022-01-27T18:07:51.0114659Z '1.41'
2022-01-27T18:07:51.0127662Z Docker daemon API version: '1.41'
2022-01-27T18:07:51.0128461Z ##[command]/bin/docker version --format '{{.Client.APIVersion}}'
2022-01-27T18:07:51.0768687Z '1.41'
2022-01-27T18:07:51.0779843Z Docker client API version: '1.41'
2022-01-27T18:07:51.0787176Z ##[endgroup]
2022-01-27T18:07:51.0787988Z ##[group]Clean up resources from previous jobs
2022-01-27T18:07:51.0791626Z ##[command]/bin/docker ps --all --quiet --no-trunc --filter "label=765292"
2022-01-27T18:07:51.1311493Z ##[command]/bin/docker network prune --force --filter "label=765292"
2022-01-27T18:07:51.1805192Z ##[endgroup]
2022-01-27T18:07:51.1805738Z ##[group]Create local container network
2022-01-27T18:07:51.1813077Z ##[command]/bin/docker network create --label 765292 github_network_d4418565d49a4f199a9b7f6de95c4b4d
2022-01-27T18:07:51.2698903Z 40bdebc458961940d08fe108051bb73287bdc1de310b9ab135e591d609932d7c
2022-01-27T18:07:51.2745181Z ##[endgroup]
2022-01-27T18:07:51.2752081Z ##[group]Starting job container
2022-01-27T18:07:51.2758233Z ##[command]/bin/docker pull centos:7
2022-01-27T18:07:52.7210362Z 7: Pulling from library/centos
2022-01-27T18:07:53.0540426Z 2d473b07cdd5: Pulling fs layer
2022-01-27T18:07:55.2630012Z 2d473b07cdd5: Verifying Checksum
2022-01-27T18:07:55.2643091Z 2d473b07cdd5: Download complete
2022-01-27T18:08:00.2017219Z 2d473b07cdd5: Pull complete
2022-01-27T18:08:00.2140136Z Digest: sha256:9d4bcbbb213dfd745b58be38b13b996ebb5ac315fe75711bd618426a630e0987
2022-01-27T18:08:00.2174982Z Status: Downloaded newer image for centos:7
2022-01-27T18:08:00.2209034Z docker.io/library/centos:7
2022-01-27T18:08:00.2280932Z ##[command]/bin/docker create --name da0b36487a03417b86d2412cfb27e472_centos7_d593a3 --label 765292 --workdir /__w/graham-node-action-test/graham-node-action-test --network github_network_d4418565d49a4f199a9b7f6de95c4b4d  -e "HTTPS_PROXY=http://PROXY_URL_REDACTED:8080" -e "https_proxy=http://PROXY_URL_REDACTED:8080" -e "NO_PROXY=github.sfu.ca" -e "no_proxy=github.sfu.ca" -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/opt/actions-runner/_work":"/__w" -v "/opt/actions-runner/externals":"/__e":ro -v "/opt/actions-runner/_work/_temp":"/__w/_temp" -v "/opt/actions-runner/_work/_actions":"/__w/_actions" -v "/opt/actions-runner/_work/_tool":"/__w/_tool" -v "/opt/actions-runner/_work/_temp/_github_home":"/github/home" -v "/opt/actions-runner/_work/_temp/_github_workflow":"/github/workflow" --entrypoint "tail" centos:7 "-f" "/dev/null"
2022-01-27T18:08:00.4374280Z 43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5
2022-01-27T18:08:00.4432203Z ##[command]/bin/docker start 43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5
2022-01-27T18:08:00.9114760Z 43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5
2022-01-27T18:08:00.9180303Z ##[command]/bin/docker ps --all --filter id=43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5 --filter status=running --no-trunc --format "{{.ID}} {{.Status}}"
2022-01-27T18:08:00.9667179Z 43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5 Up Less than a second
2022-01-27T18:08:00.9712565Z ##[command]/bin/docker inspect --format "{{range .Config.Env}}{{println .}}{{end}}" 43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5
2022-01-27T18:08:01.0215520Z GITHUB_ACTIONS=true
2022-01-27T18:08:01.0251848Z HTTP_PROXY=http://PROXY_URL_REDACTED:8080
2022-01-27T18:08:01.0253936Z http_proxy=http://PROXY_URL_REDACTED:8080
2022-01-27T18:08:01.0255668Z HTTPS_PROXY=http://PROXY_URL_REDACTED:8080
2022-01-27T18:08:01.0258204Z https_proxy=http://PROXY_URL_REDACTED:8080
2022-01-27T18:08:01.0259345Z NO_PROXY=github.sfu.ca
2022-01-27T18:08:01.0260162Z no_proxy=github.sfu.ca
2022-01-27T18:08:01.0261562Z HOME=/github/home
2022-01-27T18:08:01.0262411Z CI=true
2022-01-27T18:08:01.0263646Z PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2022-01-27T18:08:01.0286384Z ##[endgroup]
2022-01-27T18:08:01.0287846Z ##[group]Waiting for all services to be ready
2022-01-27T18:08:01.0290021Z ##[endgroup]
2022-01-27T18:08:01.0602306Z ##[group]Run actions/setup-node@v2
2022-01-27T18:08:01.0603327Z with:
2022-01-27T18:08:01.0603882Z   node-version: 14
2022-01-27T18:08:01.0604407Z   always-auth: false
2022-01-27T18:08:01.0604791Z   check-latest: false
2022-01-27T18:08:01.0605953Z   token: ***
2022-01-27T18:08:01.0606293Z ##[endgroup]
2022-01-27T18:08:01.0629203Z ##[command]/bin/docker exec  43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5 sh -c "cat /etc/*release | grep ^ID"
2022-01-27T18:08:01.5435774Z Attempting to download 14...
2022-01-27T18:08:02.7348236Z Acquiring 14.18.3 - x64 from https://github.com/actions/node-versions/releases/download/14.18.3-1681282640/node-14.18.3-linux-x64.tar.gz
2022-01-27T18:08:05.7593044Z Extracting ...
2022-01-27T18:08:05.7849089Z [command]/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword -C /__w/_temp/cfe0cfa9-6cd8-4a6e-b0e7-edf8145b7c82 -f /__w/_temp/fb1f94e7-5e5a-4b75-940e-d16a53be7f33
2022-01-27T18:08:06.7624757Z Adding to the cache ...
2022-01-27T18:08:08.0295373Z Done
2022-01-27T18:08:08.0603716Z ##[group]Run actions/checkout@v2
2022-01-27T18:08:08.0604253Z with:
2022-01-27T18:08:08.0604802Z   repository: its/graham-node-action-test
2022-01-27T18:08:08.0605882Z   token: ***
2022-01-27T18:08:08.0606236Z   ssh-strict: true
2022-01-27T18:08:08.0606760Z   persist-credentials: true
2022-01-27T18:08:08.0607234Z   clean: true
2022-01-27T18:08:08.0607711Z   fetch-depth: 1
2022-01-27T18:08:08.0608164Z   lfs: false
2022-01-27T18:08:08.0608564Z   submodules: false
2022-01-27T18:08:08.0608936Z ##[endgroup]
2022-01-27T18:08:08.0617687Z ##[command]/bin/docker exec  43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5 sh -c "cat /etc/*release | grep ^ID"
2022-01-27T18:08:08.4009216Z Syncing repository: its/graham-node-action-test
2022-01-27T18:08:08.4011290Z ##[group]Getting Git version info
2022-01-27T18:08:08.4012647Z Working directory is '/__w/graham-node-action-test/graham-node-action-test'
2022-01-27T18:08:08.4018775Z ##[endgroup]
2022-01-27T18:08:08.4020388Z Deleting the contents of '/__w/graham-node-action-test/graham-node-action-test'
2022-01-27T18:08:08.4021511Z The repository will be downloaded using the GitHub REST API
2022-01-27T18:08:08.4022436Z To create a local Git repository instead, add Git 2.18 or higher to the PATH
2022-01-27T18:08:08.4023491Z Downloading the archive
2022-01-27T18:08:08.5785985Z Writing archive to disk
2022-01-27T18:08:08.5797873Z Extracting the archive
2022-01-27T18:08:08.5821469Z [command]/usr/bin/tar xz -C /__w/graham-node-action-test/graham-node-action-test/b9fc907a-feae-411a-b3b9-037f7fcb2af5 -f /__w/graham-node-action-test/graham-node-action-test/b9fc907a-feae-411a-b3b9-037f7fcb2af5.tar.gz
2022-01-27T18:08:08.5911436Z Resolved version its-graham-node-action-test-f4cec6008d7ca05cb32a9fe7ccdff5c5ce83fd88
2022-01-27T18:08:08.6177685Z ##[group]Run cat README.md
2022-01-27T18:08:08.6178406Z �[36;1mcat README.md�[0m
2022-01-27T18:08:08.6180189Z shell: sh -e {0}
2022-01-27T18:08:08.6180637Z ##[endgroup]
2022-01-27T18:08:08.7418633Z # graham-node-action-test
2022-01-27T18:08:08.7705790Z Post job cleanup.
2022-01-27T18:08:08.7712623Z ##[command]/bin/docker exec  43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5 sh -c "cat /etc/*release | grep ^ID"
2022-01-27T18:08:09.1386976Z Post job cleanup.
2022-01-27T18:08:09.1394159Z ##[command]/bin/docker exec  43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5 sh -c "cat /etc/*release | grep ^ID"
2022-01-27T18:08:09.5528486Z Stop and remove container: da0b36487a03417b86d2412cfb27e472_centos7_d593a3
2022-01-27T18:08:09.5533053Z ##[command]/bin/docker rm --force 43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5
2022-01-27T18:08:10.7541686Z 43fc9a043754e2183df3e235e200c916eed56c921007e5ffbb5d4c827e7279d5
2022-01-27T18:08:10.7802244Z Remove container network: github_network_d4418565d49a4f199a9b7f6de95c4b4d
2022-01-27T18:08:10.7806120Z ##[command]/bin/docker network rm github_network_d4418565d49a4f199a9b7f6de95c4b4d
2022-01-27T18:08:10.9102632Z github_network_d4418565d49a4f199a9b7f6de95c4b4d
2022-01-27T18:08:10.9214671Z Cleaning up orphan processes

This comment in #834 seems to indicate that the images that act uses should have node installed, but that doesn't seem to be the case (at least not with the medium and micro images; I don't have enough free space on this VM to try the full image).

❯ cat ~/.actrc               
-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
-P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04

❯ docker images | grep catthehacker      
ghcr.io/catthehacker/ubuntu                          act-latest           1358e4e6441f   5 days ago      1e+03MB

❯ docker run --rm ghcr.io/catthehacker/ubuntu:act-latest node --version 
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "node": executable file not found in $PATH: unknown.
opr commented

Probably not helpful to you, but it could help others: I was getting this error. I'm on Mac OSX and I just ran brew install act and the error went away.

container: is not yet supported (as in, it will run in a container, but you won't get node and other stuff that GHA mounts into that container for it to work properly)

Well, that would explain it. Would you consider adding this limitation to the known issues section of the readme? It would have saved me a few frustrating hours yesterday.

Duplicate of #917

Is this closed because it's a duplicate or because it's fixed? I assume duplicate, but want to make sure.

iTrooz commented

Duplicate of #917

Hello, I think #917 was not a duplicate (I'm not sure why it was considered as so, as #917 is about using docker as a step, and this issue is about putting node inside containers)

Could you reopen, and point it out in "known issues" ?

(I can still reproduce this as of 0.2.34 using the author's instructions)

Yeah this issue is unrelated to 917.

However changing this would be a lot of work and would reduce platform support to what GitHub supports so I would suggest to keep current behavior for platforms not supported by GitHub.

iTrooz commented

I don't understand, what are "platforms that github supports" ?

I thought I was able to use any container image I wanted, and github would somehow inject a nodejs runtime in it. Is that not the case, are popular container images manually patched by github's team ?

I don't understand, what are "platforms that github supports" ?

  • linux x86_64, linux alpine x86_64 (container only), linux armv7, linux arm64, windows x86_64, windows arm64, macOS x86_64, macOS arm64

I thought I was able to use any container image I wanted

No, that's not the case. You cannot use i386 (node actions won't work, partially working), arm64 and armv7 containers on a x86_64 runner.

This works in act, by providing node in PATH

are popular container images manually patched by github's team ?

No, not patched.

act works also on freebsd, plan9, solaris, openbsd, dragonflybsd and on riscv, i386, ppc64, mips64...

point it out in "known issues" ?

I point that out in my downstream project github-act-runner under Known limitations, but not in act itself. I didn't introduce this in act.

iTrooz commented

I'm not sure I understand why we are talking about architecture

This works in act, by providing node in PATH

How does github does that in container images ? And couldn't you also do that ?

How does github does that in container images ?

Each release comes with node binaries in an external tool folder, which it bind mounts into the container.

Then it uses the full path to external tools mount node tool.

And couldn't you also do that ?

Yes, I never said impossible. Only much work.

NNNNzs commented

i have same problem,Have you solved it yet?

I wonder if I'm hitting the same problem:

The 3rd party action.yaml has this code:

runs:
  using: 'node16'
  main: 'dist/setup/index.js'
  post: 'dist/cache-save/index.js'
  post-if: success()

Paths under dist seem OK.

Somehow, the main section succeeds, but the post section fails with:

[test.yaml/pytest-3]   🐳  docker exec cmd=[node /var/run/act/actions/actions-setup-python@v4/dist/cache-save/index.js] user= workdir=
| OCI runtime exec failed: exec failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown

Real GHA: OK
act x84-64 host: I can't test
act ARM 64 host: Fail (I'm using act --container-architecture linux/amd64 and relying on Docker Desktop / Rosetta to run foreign arch)

I made a MRE for my flavour of this issue: https://github.com/dimaqq/mre-973

I have the same issue here

I'm experiencing this same issue no matter what source image I use, my own or the act provided images.

Use this code to install node:

- name: "Determine prerequisites"
  id: prereq
  run: |
    echo "need_node=$(command -v node >/dev/null 2>&1 && echo 0 || echo 1)" >> $GITHUB_OUTPUT

# Consider switching to https://github.com/actions/setup-node when it works
# https://github.com/nektos/act/issues/973
- name: Install node
  if: ${{ steps.prereq.outputs.need_node == '1' }}
  run: |
    if [ "${RUNNER_OS,,}" = "windows" ]
    then
      choco install nodejs -y
      echo "C:\Program Files\nodejs" >> $GITHUB_PATH
    else
      curl -sS https://webi.sh/node | sh
      echo ~/.local/opt/node/bin >> $GITHUB_PATH
    fi

If you need yarn too, see this implementation.