[PR #2658] Index entries in action cache directory by SHA #2541

Open
opened 2026-03-01 21:55:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/2658
Author: @ChemiCalChems
Created: 2/10/2025
Status: 🔄 Open

Base: masterHead: reusable-workflows-use-sha


📝 Commits (2)

  • 1277c09 Index entries in action cache directory by SHA
  • 5dba7bf Use token for remote listing operation

📊 Changes

2 files changed (+45 additions, -6 deletions)

View changed files

📝 pkg/common/git/git.go (+38 -5)
📝 pkg/runner/reusable_workflow.go (+7 -1)

📄 Description

Previously they were indexed by ref name, which could be a SHA or a tag/branch name, but if a branch name was used and that branch was updated, the new reusable workflow action wouldn't be pulled.

This meant the user would have to delete the associated cache entry to be able to use the new version of the reusable workflow. If the user really wants stability, they should specify the reusable workflow by
SHA instead of by branch name/tag.

Ready to merge on my side.


🔄 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/2658 **Author:** [@ChemiCalChems](https://github.com/ChemiCalChems) **Created:** 2/10/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `reusable-workflows-use-sha` --- ### 📝 Commits (2) - [`1277c09`](https://github.com/nektos/act/commit/1277c094c88dc06265cf959afcce83453537a83f) Index entries in action cache directory by SHA - [`5dba7bf`](https://github.com/nektos/act/commit/5dba7bfe906329ab49f8b9f60284d43e09a7d937) Use token for remote listing operation ### 📊 Changes **2 files changed** (+45 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `pkg/common/git/git.go` (+38 -5) 📝 `pkg/runner/reusable_workflow.go` (+7 -1) </details> ### 📄 Description Previously they were indexed by ref name, which could be a SHA or a tag/branch name, but if a branch name was used and that branch was updated, the new reusable workflow action wouldn't be pulled. This meant the user would have to delete the associated cache entry to be able to use the new version of the reusable workflow. If the user really wants stability, they should specify the reusable workflow by SHA instead of by branch name/tag. Ready to merge on my side. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#2541
No description provided.