[PR #5986] fix: support nested/chained annotated tags (e.g., gradle/actions@v4) #2646

Open
opened 2026-03-01 22:37:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/5986
Author: @hhgyu
Created: 12/29/2025
Status: 🔄 Open

Base: masterHead: fix/nested-tag-resolution


📝 Commits (3)

  • ebfae0c fix: resolve nested/chained annotated tags
  • d161b9b Merge branch 'master' into fix/nested-tag-resolution
  • 66fe3b2 Merge branch 'master' into fix/nested-tag-resolution

📊 Changes

2 files changed (+158 additions, -5 deletions)

View changed files

📝 pkg/common/git/git.go (+71 -5)
📝 pkg/common/git/git_test.go (+87 -0)

📄 Description

Problem

When using actions with nested annotated tags (where a tag points to
another tag instead of a commit), act fails with:

Unable to resolve v4: unsupported object type

This affects actions like:

  • gradle/actions@v4
  • borales/actions-yarn@v4
  • pr-mpt/actions-commit-hash@v2

These use a chained tag structure: vX (tag) → vX.x.x (tag) → commit

Solution

Add recursive tag resolution to handle nested annotated tags:

  • resolveTagToCommit(): Recursively dereferences tag chains until reaching a commit
  • resolveRefToCommit(): Wrapper that tries standard resolution first, falls back to nested tag handling

Testing

  • Added unit tests for nested tag resolution (1-3 levels deep)
  • Added integration test with gradle/actions@v4
  • All existing tests pass

Fixes #5862
Fixes #1600
Related: #1545


🔄 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/5986 **Author:** [@hhgyu](https://github.com/hhgyu) **Created:** 12/29/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix/nested-tag-resolution` --- ### 📝 Commits (3) - [`ebfae0c`](https://github.com/nektos/act/commit/ebfae0cb8156c5b6eb25d4b909acc6bc6257774e) fix: resolve nested/chained annotated tags - [`d161b9b`](https://github.com/nektos/act/commit/d161b9bfdab8fd99f9f718ca5d21f4e3964dcb0c) Merge branch 'master' into fix/nested-tag-resolution - [`66fe3b2`](https://github.com/nektos/act/commit/66fe3b26c421f49ac2b95f1a6a4d1b033f9494a6) Merge branch 'master' into fix/nested-tag-resolution ### 📊 Changes **2 files changed** (+158 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `pkg/common/git/git.go` (+71 -5) 📝 `pkg/common/git/git_test.go` (+87 -0) </details> ### 📄 Description ## Problem When using actions with nested annotated tags (where a tag points to another tag instead of a commit), act fails with: Unable to resolve v4: unsupported object type This affects actions like: - `gradle/actions@v4` - `borales/actions-yarn@v4` - `pr-mpt/actions-commit-hash@v2` These use a chained tag structure: `vX` (tag) → `vX.x.x` (tag) → commit ## Solution Add recursive tag resolution to handle nested annotated tags: - `resolveTagToCommit()`: Recursively dereferences tag chains until reaching a commit - `resolveRefToCommit()`: Wrapper that tries standard resolution first, falls back to nested tag handling ## Testing - Added unit tests for nested tag resolution (1-3 levels deep) - Added integration test with `gradle/actions@v4` - All existing tests pass Fixes #5862 Fixes #1600 Related: #1545 --- <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#2646
No description provided.