[PR #2170] [MERGED] fix: subpath actions via new artifact cache #2298

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/2170
Author: @ChristopherHX
Created: 1/28/2024
Status: Merged
Merged: 1/28/2024
Merged by: @mergify[bot]

Base: masterHead: new-artifact-cache-fix-subpath-actions


📝 Commits (2)

  • 97a360a fix: subpath actions via new artifact cache
  • f7c4deb Merge branch 'master' into new-artifact-cache-fix-subpath-actions

📊 Changes

2 files changed (+10 additions, -9 deletions)

View changed files

📝 pkg/runner/action.go (+9 -8)
📝 pkg/runner/step_action_remote.go (+1 -1)

📄 Description

This bug is behind a feature flag, which is good so no impact for regular users of act.

readfile have always read from action.yml and didn't passed the absolute path inside the action repo. This is fixed now, so readfile applies the subpath as prefix

Additionally the repo content has been copied into the subpath, so I applied a fix to use the trimmed actionContainer path as the code used without the feature toggle

To verify

on: push
jobs:
  _:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/cache/save@v4

using vscode debug config

        {
            "name": "Launch Package",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${workspaceFolder}",
            "args": [
                "-W",
                "w.yml",
                "-P",
                "ubuntu-latest=-self-hosted",
                "--use-new-action-cache"
            ]
        }

After this fix we get

[w.yml/_] ⭐ Run Main actions/cache/save@v4
[w.yml/_]   | [warning]Key is not specified.
[w.yml/_]   ✅  Success - Main actions/cache/save@v4
[w.yml/_] Cleaning up container for job _
[w.yml/_] 🏁  Job succeeded

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/2170 **Author:** [@ChristopherHX](https://github.com/ChristopherHX) **Created:** 1/28/2024 **Status:** ✅ Merged **Merged:** 1/28/2024 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `new-artifact-cache-fix-subpath-actions` --- ### 📝 Commits (2) - [`97a360a`](https://github.com/nektos/act/commit/97a360a4f9ab9ca2886134db7f9c65b8d9827d96) fix: subpath actions via new artifact cache - [`f7c4deb`](https://github.com/nektos/act/commit/f7c4debf54d5e03b080ec0fce3e7bf96399e4bad) Merge branch 'master' into new-artifact-cache-fix-subpath-actions ### 📊 Changes **2 files changed** (+10 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `pkg/runner/action.go` (+9 -8) 📝 `pkg/runner/step_action_remote.go` (+1 -1) </details> ### 📄 Description This bug is behind a feature flag, which is good so no impact for regular users of act. readfile have always read from `action.yml` and didn't passed the absolute path inside the action repo. This is fixed now, so readfile applies the subpath as prefix Additionally the repo content has been copied into the subpath, so I applied a fix to use the trimmed actionContainer path as the code used without the feature toggle To verify ```yaml on: push jobs: _: runs-on: ubuntu-latest steps: - uses: actions/cache/save@v4 ``` using vscode debug config ```json { "name": "Launch Package", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}", "args": [ "-W", "w.yml", "-P", "ubuntu-latest=-self-hosted", "--use-new-action-cache" ] } ``` After this fix we get ``` [w.yml/_] ⭐ Run Main actions/cache/save@v4 [w.yml/_] | [warning]Key is not specified. [w.yml/_] ✅ Success - Main actions/cache/save@v4 [w.yml/_] Cleaning up container for job _ [w.yml/_] 🏁 Job succeeded ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:54:51 +03:00
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#2298
No description provided.