[GH-ISSUE #5901] open source repo, hence reproduceable #1280

Closed
opened 2026-03-01 21:50:08 +03:00 by kerem · 2 comments
Owner

Originally created by @nnWhisperer on GitHub (Aug 14, 2025).
Original GitHub issue: https://github.com/nektos/act/issues/5901

Bug report info

Hello,
I receive a quite generic error:
"❗  ::error::Input required and not supplied: token"
It happens in the checkout stage, which normally doesn't require a token, since everything in this issue is open source.
I resolved it by giving both the GITHUB_TOKEN and the TARGET_TOKEN the same value.

Command used with act

act -s TARGET_TOKEN="ghp_..." -W .github/workflows/Sync-upstream.yml workflow_dispatch --input-file tester.txt
The following resolves the problem:
act -s GITHUB_TOKEN="ghp_..." -s TARGET_TOKEN="ghp_..." -W .github/workflows/Sync-upstream.yml workflow_dispatch --input-file tester.txt

Describe issue

Hello,
I'm trying to run the given code and receiving a quite generic error that I searched for similar issues but their solutions such as adding github_token as secret didn't resolve it. repeating a secret token resolved it, which seems to be a bug.

https://github.com/nnWhisperer/ansible-collection-toolkit/tree/main

Workflow content

name: 'Upstream Sync'
# taken from: https://github.com/aormsby/Fork-Sync-With-Upstream-action

on:
  schedule:
    - cron:  '0 7 * * 1,4'
    # scheduled at 07:00 every Monday and Thursday

  workflow_dispatch:  # click the button on Github repo!
    inputs:
      sync_test_mode: # Adds a boolean option that appears during manual workflow run for easy test mode config
        description: 'Fork Sync Test Mode'
        type: boolean
        default: false

jobs:
  sync_latest_from_upstream:
    runs-on: ubuntu-latest
    name: Sync latest commits from upstream repo

    steps:
    # REQUIRED step
    # Step 1: run a standard checkout action, provided by github
    - name: Checkout target repo
      uses: actions/checkout@v3
      with:
        # optional: set the branch to checkout,
        # sync action checks out your 'target_sync_branch' anyway
        ref:  my-branch
        # REQUIRED if your upstream repo is private (see wiki)
        persist-credentials: false

    # REQUIRED step
    # Step 2: run the sync action
    - name: Sync upstream changes
      id: sync
      uses: aormsby/Fork-Sync-With-Upstream-action@v3.4.1
      with:
        target_sync_branch: my-branch
        # REQUIRED 'target_repo_token' exactly like this!
        upstream_pull_args: '--allow-unrelated-histories'
        target_repo_token: ${{ secrets.TARGET_TOKEN }}
        upstream_sync_branch: main
        upstream_sync_repo: hifis-net/ansible-collection-toolkit
        # upstream_repo_access_token: ${{ secrets.UPSTREAM_REPO_SECRET }}

        # Set test_mode true during manual dispatch to run tests instead of the true action!!
        test_mode: ${{ inputs.sync_test_mode }}
      
    # Step 3: Display a sample message based on the sync output var 'has_new_commits'
    - name: New commits found
      if: steps.sync.outputs.has_new_commits == 'true'
      run: echo "New commits were found to sync."
    
    - name: No new commits
      if: steps.sync.outputs.has_new_commits == 'false'
      run: echo "There were no new commits."
      
    - name: Show value of 'has_new_commits'
      run: echo ${{ steps.sync.outputs.has_new_commits }}

Relevant log output

ansible-collection-toolkit (main) $ act -s GITHUB_TOKEN="" -s TARGET_TOKEN="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" -W .github/workflows/Sync-upstream.yml workflow_dispatch --input-file tester.txt 
INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///var/run/docker.sock' 
[Upstream Sync/Sync latest commits from upstream repo] ⭐ Run Set up job
[Upstream Sync/Sync latest commits from upstream repo] 🚀  Start image=catthehacker/ubuntu:act-latest
[Upstream Sync/Sync latest commits from upstream repo]   🐳  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[Upstream Sync/Sync latest commits from upstream repo]   🐳  docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Upstream Sync/Sync latest commits from upstream repo]   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Upstream Sync/Sync latest commits from upstream repo]   🐳  docker exec cmd=[node --no-warnings -e console.log(process.execPath)] user= workdir=
[Upstream Sync/Sync latest commits from upstream repo]   ✅  Success - Set up job
[Upstream Sync/Sync latest commits from upstream repo]   ☁  git clone 'https://github.com/actions/checkout' # ref=v3
[Upstream Sync/Sync latest commits from upstream repo]   ☁  git clone 'https://github.com/aormsby/Fork-Sync-With-Upstream-action' # ref=v3.4.1
[Upstream Sync/Sync latest commits from upstream repo] ⭐ Run Main Checkout target repo
[Upstream Sync/Sync latest commits from upstream repo]   🐳  docker cp src=/home/codespace/.cache/act/actions-checkout@v3/ dst=/var/run/act/actions/actions-checkout@v3/
[Upstream Sync/Sync latest commits from upstream repo]   🐳  docker exec cmd=[/opt/acttoolcache/node/18.20.8/x64/bin/node /var/run/act/actions/actions-checkout@v3/dist/index.js] user= workdir=
[Upstream Sync/Sync latest commits from upstream repo]   ❗  ::error::Input required and not supplied: token
[Upstream Sync/Sync latest commits from upstream repo]   ❌  Failure - Main Checkout target repo [541.16587ms]
[Upstream Sync/Sync latest commits from upstream repo] exitcode '1': failure
[Upstream Sync/Sync latest commits from upstream repo] ⭐ Run Post Checkout target repo
[Upstream Sync/Sync latest commits from upstream repo]   🐳  docker exec cmd=[/opt/acttoolcache/node/18.20.8/x64/bin/node /var/run/act/actions/actions-checkout@v3/dist/index.js] user= workdir=
[Upstream Sync/Sync latest commits from upstream repo]   ✅  Success - Post Checkout target repo [163.395133ms]
[Upstream Sync/Sync latest commits from upstream repo] ⭐ Run Complete job
[Upstream Sync/Sync latest commits from upstream repo]   ✅  Success - Complete job
[Upstream Sync/Sync latest commits from upstream repo] 🏁  Job failed
Error: Job 'Sync latest commits from upstream repo' failed

Additional information

the tester.txt file contains:

sync_test_mode=false

I also tested by setting it to true.

Originally created by @nnWhisperer on GitHub (Aug 14, 2025). Original GitHub issue: https://github.com/nektos/act/issues/5901 ### Bug report info ```plain text Hello, I receive a quite generic error: "❗ ::error::Input required and not supplied: token" It happens in the checkout stage, which normally doesn't require a token, since everything in this issue is open source. I resolved it by giving both the GITHUB_TOKEN and the TARGET_TOKEN the same value. ``` ### Command used with act ```sh act -s TARGET_TOKEN="ghp_..." -W .github/workflows/Sync-upstream.yml workflow_dispatch --input-file tester.txt The following resolves the problem: act -s GITHUB_TOKEN="ghp_..." -s TARGET_TOKEN="ghp_..." -W .github/workflows/Sync-upstream.yml workflow_dispatch --input-file tester.txt ``` ### Describe issue Hello, I'm trying to run the given code and receiving a quite generic error that I searched for similar issues but their solutions such as adding github_token as secret didn't resolve it. repeating a secret token resolved it, which seems to be a bug. ### Link to GitHub repository https://github.com/nnWhisperer/ansible-collection-toolkit/tree/main ### Workflow content ```yml name: 'Upstream Sync' # taken from: https://github.com/aormsby/Fork-Sync-With-Upstream-action on: schedule: - cron: '0 7 * * 1,4' # scheduled at 07:00 every Monday and Thursday workflow_dispatch: # click the button on Github repo! inputs: sync_test_mode: # Adds a boolean option that appears during manual workflow run for easy test mode config description: 'Fork Sync Test Mode' type: boolean default: false jobs: sync_latest_from_upstream: runs-on: ubuntu-latest name: Sync latest commits from upstream repo steps: # REQUIRED step # Step 1: run a standard checkout action, provided by github - name: Checkout target repo uses: actions/checkout@v3 with: # optional: set the branch to checkout, # sync action checks out your 'target_sync_branch' anyway ref: my-branch # REQUIRED if your upstream repo is private (see wiki) persist-credentials: false # REQUIRED step # Step 2: run the sync action - name: Sync upstream changes id: sync uses: aormsby/Fork-Sync-With-Upstream-action@v3.4.1 with: target_sync_branch: my-branch # REQUIRED 'target_repo_token' exactly like this! upstream_pull_args: '--allow-unrelated-histories' target_repo_token: ${{ secrets.TARGET_TOKEN }} upstream_sync_branch: main upstream_sync_repo: hifis-net/ansible-collection-toolkit # upstream_repo_access_token: ${{ secrets.UPSTREAM_REPO_SECRET }} # Set test_mode true during manual dispatch to run tests instead of the true action!! test_mode: ${{ inputs.sync_test_mode }} # Step 3: Display a sample message based on the sync output var 'has_new_commits' - name: New commits found if: steps.sync.outputs.has_new_commits == 'true' run: echo "New commits were found to sync." - name: No new commits if: steps.sync.outputs.has_new_commits == 'false' run: echo "There were no new commits." - name: Show value of 'has_new_commits' run: echo ${{ steps.sync.outputs.has_new_commits }} ``` ### Relevant log output ```sh ansible-collection-toolkit (main) $ act -s GITHUB_TOKEN="" -s TARGET_TOKEN="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" -W .github/workflows/Sync-upstream.yml workflow_dispatch --input-file tester.txt INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///var/run/docker.sock' [Upstream Sync/Sync latest commits from upstream repo] ⭐ Run Set up job [Upstream Sync/Sync latest commits from upstream repo] 🚀 Start image=catthehacker/ubuntu:act-latest [Upstream Sync/Sync latest commits from upstream repo] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true [Upstream Sync/Sync latest commits from upstream repo] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host" [Upstream Sync/Sync latest commits from upstream repo] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host" [Upstream Sync/Sync latest commits from upstream repo] 🐳 docker exec cmd=[node --no-warnings -e console.log(process.execPath)] user= workdir= [Upstream Sync/Sync latest commits from upstream repo] ✅ Success - Set up job [Upstream Sync/Sync latest commits from upstream repo] ☁ git clone 'https://github.com/actions/checkout' # ref=v3 [Upstream Sync/Sync latest commits from upstream repo] ☁ git clone 'https://github.com/aormsby/Fork-Sync-With-Upstream-action' # ref=v3.4.1 [Upstream Sync/Sync latest commits from upstream repo] ⭐ Run Main Checkout target repo [Upstream Sync/Sync latest commits from upstream repo] 🐳 docker cp src=/home/codespace/.cache/act/actions-checkout@v3/ dst=/var/run/act/actions/actions-checkout@v3/ [Upstream Sync/Sync latest commits from upstream repo] 🐳 docker exec cmd=[/opt/acttoolcache/node/18.20.8/x64/bin/node /var/run/act/actions/actions-checkout@v3/dist/index.js] user= workdir= [Upstream Sync/Sync latest commits from upstream repo] ❗ ::error::Input required and not supplied: token [Upstream Sync/Sync latest commits from upstream repo] ❌ Failure - Main Checkout target repo [541.16587ms] [Upstream Sync/Sync latest commits from upstream repo] exitcode '1': failure [Upstream Sync/Sync latest commits from upstream repo] ⭐ Run Post Checkout target repo [Upstream Sync/Sync latest commits from upstream repo] 🐳 docker exec cmd=[/opt/acttoolcache/node/18.20.8/x64/bin/node /var/run/act/actions/actions-checkout@v3/dist/index.js] user= workdir= [Upstream Sync/Sync latest commits from upstream repo] ✅ Success - Post Checkout target repo [163.395133ms] [Upstream Sync/Sync latest commits from upstream repo] ⭐ Run Complete job [Upstream Sync/Sync latest commits from upstream repo] ✅ Success - Complete job [Upstream Sync/Sync latest commits from upstream repo] 🏁 Job failed Error: Job 'Sync latest commits from upstream repo' failed ``` ### Additional information the tester.txt file contains: ``` sync_test_mode=false ``` I also tested by setting it to true.
kerem 2026-03-01 21:50:08 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@ChristopherHX commented on GitHub (Aug 15, 2025):

checkout parameter not supported by builtin checkout of act

      with:
        # optional: set the branch to checkout,
        # sync action checks out your 'target_sync_branch' anyway
        ref:  my-branch
        # REQUIRED if your upstream repo is private (see wiki)
        persist-credentials: false

This means actions/checkout is executed, which asserts to have a token

Provide GITHUB_TOKEN secret or remove parameters of checkout when run under act.

e.g. if: env.ACT

<!-- gh-comment-id:3191568696 --> @ChristopherHX commented on GitHub (Aug 15, 2025): checkout parameter not supported by builtin checkout of act ``` with: # optional: set the branch to checkout, # sync action checks out your 'target_sync_branch' anyway ref: my-branch # REQUIRED if your upstream repo is private (see wiki) persist-credentials: false ``` This means actions/checkout is executed, which asserts to have a token Provide `GITHUB_TOKEN` secret or remove parameters of checkout when run under act. e.g. `if: env.ACT`
Author
Owner

@nnWhisperer commented on GitHub (Aug 15, 2025):

I reported it because this behavior isn't intuitive and hence prone to cause errors/baffle the tool users. If you say that's not a bug, fine then.

<!-- gh-comment-id:3192352782 --> @nnWhisperer commented on GitHub (Aug 15, 2025): I reported it because this behavior isn't intuitive and hence prone to cause errors/baffle the tool users. If you say that's not a bug, fine then.
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#1280
No description provided.