[GH-ISSUE #1044] Issue: cache busting does not work for actions pointing to branch #604

Closed
opened 2026-03-01 21:44:54 +03:00 by kerem · 3 comments
Owner

Originally created by @robertkowalski on GitHub (Mar 15, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1044

System information

  • Operating System: macOS
  • Architecture: x64 (64-bit)
  • Apple M1: no
  • Docker version: 20.10.7
  • Docker image used in act: node:12-buster-slim
  • act version: 4d71071

Expected behaviour

Developing a with an action from the main or master branch should use the latest version from that branch

Actual behaviour

When you develop an action, and it points to a certain branch, e.g. main, you have to delete ~/.cache/act/ manually in between each push to the branch. If not, act will use an outdated version of the action for the run

Workflow and/or repository

workflow

https://github.com/robertkowalski/act-issue

Rename a required argument in the code, then rerun act.

name: Deploy app

on: [push]

jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 14.x

      - uses: robertkowalski/act-issue@main
        with:
          # The environment, should be "production" or "preview"
          environment: preview

The change between the act runs can be found in this diff: github.com/robertkowalski/act-issue@f6ca756b73

Steps to reproduce

  1. create action with required inputs, push to github
  2. reference the file in your workflow with the branchname, run act
  3. then update the name of the required field, push to main again
  4. run act, it will fail that the old field is not set
  5. delete ~/.cache/act/ - it works

act output

Log
[Deploy app/tests]   ❗  ::error::Input required and not supplied: env
Originally created by @robertkowalski on GitHub (Mar 15, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1044 ## System information - Operating System: macOS - Architecture: x64 (64-bit) - Apple M1: no - Docker version: 20.10.7 - Docker image used in `act`: node:12-buster-slim - `act` version: [4d71071](https://github.com/nektos/act/commit/4d7107161e231406bee856258ec847844623224e) ## Expected behaviour Developing a with an action from the main or master branch should use the latest version from that branch ## Actual behaviour When you develop an action, and it points to a certain branch, e.g. `main`, you have to delete `~/.cache/act/` manually in between each push to the branch. If not, act will use an outdated version of the action for the run ## Workflow and/or repository <details> <summary>workflow</summary> https://github.com/robertkowalski/act-issue Rename a required argument in the code, then rerun act. ```none name: Deploy app on: [push] jobs: tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: 14.x - uses: robertkowalski/act-issue@main with: # The environment, should be "production" or "preview" environment: preview ``` The change between the act runs can be found in this diff: https://github.com/robertkowalski/act-issue/commit/f6ca756b730bd4ccde7508846a299ca9bd1b6a8f </details> ## Steps to reproduce 1. create action with required inputs, push to github 2. reference the file in your workflow with the branchname, run act 3. then update the name of the required field, push to main again 4. run act, it will fail that the old field is not set 5. delete `~/.cache/act/` - it works ## `act` output <!-- - Use `act` with `-v`/`--verbose` and paste output from your terminal in code block below --> <details> <summary>Log</summary> ```none [Deploy app/tests] ❗ ::error::Input required and not supplied: env ``` </details>
kerem 2026-03-01 21:44:54 +03:00
Author
Owner

@ChristopherHX commented on GitHub (Mar 15, 2022):

This issue appeared again https://github.com/nektos/act/issues/785? Or it was never fixed...

<!-- gh-comment-id:1068105043 --> @ChristopherHX commented on GitHub (Mar 15, 2022): This issue appeared again https://github.com/nektos/act/issues/785? Or it was never fixed...
Author
Owner

@ChristopherHX commented on GitHub (Mar 15, 2022):

I cannot reproduce it.

What I tried, with the same act version on windows + a fake ghes instance, with branch main as version

  • I created an repo without an action.yml, only README
  • act fails
  • added the action.yml
  • act succeeds

I also tried your sample repo, but still not reproducible

  • clone your repo
  • created a new repo
  • push HEAD~2 to branch main
  • act fails, due missing environment
  • push HEAD~1 to branch main
  • act fails, due missing env

Did you change your github instance parameter of act, without cache reset? I ask because, this is a problem for me and leads to outdated actions.

<!-- gh-comment-id:1068134368 --> @ChristopherHX commented on GitHub (Mar 15, 2022): I cannot reproduce it. What I tried, with the same act version on windows + a fake ghes instance, with branch main as version - I created an repo without an action.yml, only README - act fails - added the action.yml - act succeeds I also tried your sample repo, but still not reproducible - clone your repo - created a new repo - push HEAD~2 to branch main - act fails, due missing environment - push HEAD~1 to branch main - act fails, due missing env Did you change your github instance parameter of act, without cache reset? I ask because, this is a problem for me and leads to outdated actions.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 15, 2022):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1099732421 --> @github-actions[bot] commented on GitHub (Apr 15, 2022): Issue is stale and will be closed in 14 days unless there is new activity
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#604
No description provided.