act: Issue: Checkout fails on 0.2.22 - "Input required and not supplied: token"
Act version
0.2.22
Expected behaviour
The checkout action’s behavior is different between 0.2.21 and 0.22.22. In 0.2.21, checkout seemed to docker cp
the repository into the image rather than perform an actual checkout. This was desirable because local changes to actions and associated scripts were properly consumed without having to push them to the repository.
Actual behaviour
act 0.2.22 actually checks out the repo. This has two immediate downsides:
- The repo now seems to require a token when it did not before.
- Even if I supply a token, I now don’t have any other local changes I have to scripts that support my actions because the code was actually cloned instead of cp’d from my local workspace.
Workflow and/or repository
My checkout action was this:
- name: Check out code
uses: actions/checkout@v2
act
output
Log
[create-terraform-resources/build] ⭐ Run Check out code
[create-terraform-resources/build] ☁ git clone 'https://github.com/actions/checkout' # ref=v2
[create-terraform-resources/build] 🐳 docker cp src=/root/.cache/act/actions-checkout@v2/ dst=/home/sre/sre/_actions/actions-checkout@v2/
[create-terraform-resources/build] ❓ ::save-state name=isPost,::true
[create-terraform-resources/build] 💬 ::debug::GITHUB_WORKSPACE = '/home/sre/sre'
[create-terraform-resources/build] 💬 ::debug::qualified repository = 'LexmarkDevOps/SRE'
[create-terraform-resources/build] 💬 ::debug::ref = 'refs/heads/feature/create-terraform-resources-action'
[create-terraform-resources/build] 💬 ::debug::commit = '0d9d65062e5eacaea789c88c7e081cd5c963452a'
[create-terraform-resources/build] 💬 ::debug::clean = true
[create-terraform-resources/build] 💬 ::debug::fetch depth = 1
[create-terraform-resources/build] 💬 ::debug::lfs = false
[create-terraform-resources/build] 💬 ::debug::submodules = false
[create-terraform-resources/build] 💬 ::debug::recursive submodules = false
[create-terraform-resources/build] ❗ ::error::Input required and not supplied: token
[create-terraform-resources/build] ❌ Failure - Check out code
Note: I’m new to using act and GitHub Actions, so please let me know if I should do something differently in my workflow.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 21
- Comments: 42 (18 by maintainers)
v0.2.23
has been released that includes fix for this issue.How is this solved?
This issue should be re-opened.
I had the same problem but running the workflow in dry mode and passing github token it works I read it from here https://github.com/nektos/act/issues/779#issuecomment-932997696
I updated the Homebrew formula, so now the HEAD version is available via
brew install act --HEAD
(afterbrew update
and maybebrew unlink act
).Just tested master branch with https://github.com/git-pile/playground/tree/f2e5a12a837896ce9087d6d087b693009f2f0e48 and it seems broken for me:
Note that in that workflow it’s trying to checkout a specific branch of another (public) repository
Thanks.
Update: On Mac, just do
brew unlink act && brew install act --HEAD
as per https://github.com/nektos/act/issues/678#issuecomment-850466260~So, the way to get the snapshot to work on Mac appears to be:~
~1. Go to https://github.com/nektos/act/pull/680/checks?check_run_id=2535655295 and click on the “Artifacts” dropdown on the right.~ ~2. Click on act-macos to download the zip file containing the binary~ ~3. unzip act-macos.zip to create a file call
act
~ ~4. In a Terminal, navigate to where you unzipped act-macos.zip and add executable permissions to theact
file typing:chmod a+x act
~ ~5. Bypass MacOS gatekeeper by typingopen act
. This will open a Terminal window. Close it when it says “[Process completed]”.~ ~6. Moveact
to a directory on your path. e.g.mv act /usr/local/bin
~~When the next version of act is released, delete
usr/local/bin/act
and then install the new version.~Hi there! Can there be a minor release for this?
Works great, thanks for your help!
If I add the “with:” property I have the same token error, if I remove it works ok (using the latest version). sample:
output:
@marnix you can also just download the prerelease artifact from the PR: https://github.com/nektos/act/suites/2686549445/artifacts/59224642
You can always get snapshot build https://github.com/nektos/act/pull/680/checks?check_run_id=2535655295
@Lexmark-peachj can you test this build and see if it fixes your use case? https://github.com/nektos/act/suites/2686549445/artifacts/59224642
Spotted and fixed as part of another, I’ll hot fix this real quick.
Trying it locally gives it the same error as above repo is private though
I’m on Ubuntu 20.04. I downloaded the Linux tar.gz for the previous release of v0.2.20 here. After unzipping and extracting the
act
executable from the tar.gz file, I’m able to execute the examples in the demo repo without the error described in this issue.Fantastic. Thanks @TonalidadeHidrica!
This info is outdated.
Actually there's a better way for `brew`.brew edit act
. It will open a file namedact.rb
, so add the following lines:brew unlink act
andbrew install --HEAD act
. You’ve got a fixed latest version! Hooray!@catthehacker, good call!
Is it possible to do this with Brew? I can use the snapshot build personally but will have a hard time propagating this across team workflows 😃