[GH-ISSUE #90] Action Version not being honored #56

Closed
opened 2026-03-01 21:39:32 +03:00 by kerem · 5 comments
Owner

Originally created by @cplee on GitHub (Feb 21, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/90

(from @timfallmk - https://github.com/nektos/act/issues/74#issuecomment-589433017)

I don't want to hijack the conversation, and I don't know if this belongs here or in a separate issue, so please yell at me if necessary 😄 .

When I attempt to run a workflow with a setup-go action in it, the necessary config files are not found:

Workflow files: https://github.com/ksync/ksync/blob/master/.github/workflows/test.yml

git remote -v
origin	https://github.com/ksync/ksync (fetch)
origin	https://github.com/ksync/ksync (push)

act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04
[Tests/Run tests] ⭐  Run actions/setup-go@v1
[Tests/Run tests]   ☁  git clone 'https://github.com/actions/setup-go' # ref=v1
[Tests/Run tests]   🐳  docker pull node:12-alpine
[Tests/Run tests]   🐳  docker run image=node:12-alpine entrypoint=[] cmd=["node" "/github/home//setup-go454447292/lib/setup-go.js"]
| internal/modules/cjs/loader.js:985
|   throw err;
|   ^
| 
| Error: Cannot find module '/github/home/setup-go454447292/lib/setup-go.js'
|     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
|     at Function.Module._load (internal/modules/cjs/loader.js:864:27)
|     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
|     at internal/main/run_main_module.js:18:47 {
|   code: 'MODULE_NOT_FOUND',
|   requireStack: []
| }
[Tests/Run tests]   ❌  Failure - actions/setup-go@v1
Error: exit with `FAILURE`: 1

I've also tried with the default environment and got the same result. I'm not sure if I'm understanding this right, but it seems like a default config file might need to be copied into the node image (in this case). Is this something that would be in the default runner?

act --version
act version 0.2.1
Originally created by @cplee on GitHub (Feb 21, 2020). Original GitHub issue: https://github.com/nektos/act/issues/90 (from @timfallmk - https://github.com/nektos/act/issues/74#issuecomment-589433017) I don't want to hijack the conversation, and I don't know if this belongs here or in a separate issue, so please yell at me if necessary 😄 . When I attempt to run a workflow with a `setup-go` action in it, the necessary config files are not found: Workflow files: https://github.com/ksync/ksync/blob/master/.github/workflows/test.yml ```shell git remote -v origin https://github.com/ksync/ksync (fetch) origin https://github.com/ksync/ksync (push) act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 [Tests/Run tests] ⭐ Run actions/setup-go@v1 [Tests/Run tests] ☁ git clone 'https://github.com/actions/setup-go' # ref=v1 [Tests/Run tests] 🐳 docker pull node:12-alpine [Tests/Run tests] 🐳 docker run image=node:12-alpine entrypoint=[] cmd=["node" "/github/home//setup-go454447292/lib/setup-go.js"] | internal/modules/cjs/loader.js:985 | throw err; | ^ | | Error: Cannot find module '/github/home/setup-go454447292/lib/setup-go.js' | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15) | at Function.Module._load (internal/modules/cjs/loader.js:864:27) | at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) | at internal/main/run_main_module.js:18:47 { | code: 'MODULE_NOT_FOUND', | requireStack: [] | } [Tests/Run tests] ❌ Failure - actions/setup-go@v1 Error: exit with `FAILURE`: 1 ``` I've also tried with the default environment and got the same result. I'm not sure if I'm understanding this right, but it seems like a default config file might need to be copied into the `node` image (in this case). Is this something that would be in the default runner? ``` act --version act version 0.2.1 ```
kerem closed this issue 2026-03-01 21:39:32 +03:00
Author
Owner

@cplee commented on GitHub (Feb 21, 2020):

The problem is that the version of the action isn't being properly used in the git checkout

<!-- gh-comment-id:589459203 --> @cplee commented on GitHub (Feb 21, 2020): The problem is that the version of the action isn't being properly used in the git checkout
Author
Owner

@timfallmk commented on GitHub (Feb 21, 2020):

@cplee Ah, you beat me to posting my own issue. Much respect!

<!-- gh-comment-id:589463842 --> @timfallmk commented on GitHub (Feb 21, 2020): @cplee Ah, you beat me to posting my own issue. Much respect!
Author
Owner

@timfallmk commented on GitHub (Feb 21, 2020):

...Aaaand sponsored. ❤️

<!-- gh-comment-id:589464914 --> @timfallmk commented on GitHub (Feb 21, 2020): ...Aaaand sponsored. ❤️
Author
Owner

@cplee commented on GitHub (Feb 21, 2020):

Much thanks @timfallmk!! 🙏

<!-- gh-comment-id:589466762 --> @cplee commented on GitHub (Feb 21, 2020): Much thanks @timfallmk!! 🙏
Author
Owner

@mced commented on GitHub (Feb 24, 2020):

@cplee Am I missing something ?

$ cat .github/workflows/ci.yml
name: CI

on: [push]

jobs:
  linter:
    name: "Linting Python Code"

    runs-on: ubuntu-18.04

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-python@v1.1.1
      with:
        python-version: 3.7

    - run: python -c "import sys; print(sys.version)"

When building from v0.2.3 (and github.com/nektos/act@e371fa8c49) I have:

$ ./act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -j linter
[CI/Linting Python Code] ⭐  Run actions/checkout@v2
[CI/Linting Python Code]   ✅  Success - actions/checkout@v2
[CI/Linting Python Code] ⭐  Run actions/setup-python@v1.1.1
[CI/Linting Python Code]   ☁  git clone 'https://github.com/actions/setup-python' # ref=v1.1.1
[CI/Linting Python Code]   🐳  docker pull node:12-alpine
[CI/Linting Python Code]   🐳  docker run image=node:12-alpine entrypoint=[] cmd=["node" "/github/home//setup-python264879224/lib/setup-python.js"]
| ##[debug]Semantic version spec of 3.7 is 3.7
| ##[debug]isExplicit: 
| ##[debug]explicit? false
| ##[debug]evaluating 0 versions
| ##[debug]match not found
| ##[error]Version 3.7 with arch x64 not found%!A(MISSING)Available versions:%!A(MISSING)%!A(MISSING)
[CI/Linting Python Code]   ❌  Failure - actions/setup-python@v1.1.1
Error: exit with `FAILURE`: 1

When building from v0.2.1 I have:

./act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -j linter
[CI/Linting Python Code] ⭐  Run actions/checkout@v2
[CI/Linting Python Code]   ✅  Success - actions/checkout@v2
[CI/Linting Python Code] ⭐  Run actions/setup-python@v1.1.1
[CI/Linting Python Code]   ☁  git clone 'https://github.com/actions/setup-python' # ref=v1.1.1
[CI/Linting Python Code]   🐳  docker pull node:12-alpine
[CI/Linting Python Code]   🐳  docker run image=node:12-alpine entrypoint=[] cmd=["node" "/github/home//setup-python912338074/lib/setup-python.js"]
| internal/modules/cjs/loader.js:985
|   throw err;
|   ^
| 
| Error: Cannot find module '/github/home/setup-python912338074/lib/setup-python.js'
|     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
|     at Function.Module._load (internal/modules/cjs/loader.js:864:27)
|     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
|     at internal/main/run_main_module.js:18:47 {
|   code: 'MODULE_NOT_FOUND',
|   requireStack: []
| }
[CI/Linting Python Code]   ❌  Failure - actions/setup-python@v1.1.1
Error: exit with `FAILURE`: 1
<!-- gh-comment-id:590528264 --> @mced commented on GitHub (Feb 24, 2020): @cplee Am I missing something ? ``` $ cat .github/workflows/ci.yml name: CI on: [push] jobs: linter: name: "Linting Python Code" runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v1.1.1 with: python-version: 3.7 - run: python -c "import sys; print(sys.version)" ``` When building from `v0.2.3` (and https://github.com/nektos/act/commit/e371fa8c49266958f1cb5c0bf53d4170e662c252) I have: ``` $ ./act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -j linter [CI/Linting Python Code] ⭐ Run actions/checkout@v2 [CI/Linting Python Code] ✅ Success - actions/checkout@v2 [CI/Linting Python Code] ⭐ Run actions/setup-python@v1.1.1 [CI/Linting Python Code] ☁ git clone 'https://github.com/actions/setup-python' # ref=v1.1.1 [CI/Linting Python Code] 🐳 docker pull node:12-alpine [CI/Linting Python Code] 🐳 docker run image=node:12-alpine entrypoint=[] cmd=["node" "/github/home//setup-python264879224/lib/setup-python.js"] | ##[debug]Semantic version spec of 3.7 is 3.7 | ##[debug]isExplicit: | ##[debug]explicit? false | ##[debug]evaluating 0 versions | ##[debug]match not found | ##[error]Version 3.7 with arch x64 not found%!A(MISSING)Available versions:%!A(MISSING)%!A(MISSING) [CI/Linting Python Code] ❌ Failure - actions/setup-python@v1.1.1 Error: exit with `FAILURE`: 1 ``` When building from `v0.2.1` I have: ``` ./act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -j linter [CI/Linting Python Code] ⭐ Run actions/checkout@v2 [CI/Linting Python Code] ✅ Success - actions/checkout@v2 [CI/Linting Python Code] ⭐ Run actions/setup-python@v1.1.1 [CI/Linting Python Code] ☁ git clone 'https://github.com/actions/setup-python' # ref=v1.1.1 [CI/Linting Python Code] 🐳 docker pull node:12-alpine [CI/Linting Python Code] 🐳 docker run image=node:12-alpine entrypoint=[] cmd=["node" "/github/home//setup-python912338074/lib/setup-python.js"] | internal/modules/cjs/loader.js:985 | throw err; | ^ | | Error: Cannot find module '/github/home/setup-python912338074/lib/setup-python.js' | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15) | at Function.Module._load (internal/modules/cjs/loader.js:864:27) | at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) | at internal/main/run_main_module.js:18:47 { | code: 'MODULE_NOT_FOUND', | requireStack: [] | } [CI/Linting Python Code] ❌ Failure - actions/setup-python@v1.1.1 Error: exit with `FAILURE`: 1 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#56
No description provided.