[PR #5888] Fix nested reusable workflows #2609

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/5888
Author: @lfallon-manifest
Created: 7/31/2025
Status: 🔄 Open

Base: masterHead: fix-nested-reusable-workflows


📝 Commits (3)

  • 755d10f fix: resolve nested reusable workflow path resolution issue
  • cf1afeb test: add nested reusable workflow test cases
  • 14a79d5 chore: fix whitespace formatting

📊 Changes

6 files changed (+66 additions, -4 deletions)

View changed files

📝 pkg/runner/reusable_workflow.go (+10 -4)
📝 pkg/runner/runner_test.go (+1 -0)
pkg/runner/testdata/nested-reusable-workflow/.github/workflows/main.yml (+21 -0)
pkg/runner/testdata/nested-reusable-workflow/.github/workflows/nested.yml (+16 -0)
pkg/runner/testdata/nested-reusable-workflow/local.yml (+9 -0)
pkg/runner/testdata/nested-reusable-workflow/push.yml (+9 -0)

📄 Description

When a reusable workflow calls another local workflow using relative paths (uses: ./.github/workflows/...), act was incorrectly looking for the nested workflow in the caller's repository instead of the reusable workflow's repository.

This fix ensures that local workflow references are resolved relative to the reusable workflow's location by passing the correct working directory to the reusable workflow runner.

Fixes https://github.com/nektos/act/issues/1875


🔄 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/5888 **Author:** [@lfallon-manifest](https://github.com/lfallon-manifest) **Created:** 7/31/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix-nested-reusable-workflows` --- ### 📝 Commits (3) - [`755d10f`](https://github.com/nektos/act/commit/755d10ff76faabd2304a2db3b5dd23438f7e3751) fix: resolve nested reusable workflow path resolution issue - [`cf1afeb`](https://github.com/nektos/act/commit/cf1afeb5abd31ca54e7fee48ec29cee4e6c21fa7) test: add nested reusable workflow test cases - [`14a79d5`](https://github.com/nektos/act/commit/14a79d5741face734a0bbfe26b7610f1f9348a1a) chore: fix whitespace formatting ### 📊 Changes **6 files changed** (+66 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `pkg/runner/reusable_workflow.go` (+10 -4) 📝 `pkg/runner/runner_test.go` (+1 -0) ➕ `pkg/runner/testdata/nested-reusable-workflow/.github/workflows/main.yml` (+21 -0) ➕ `pkg/runner/testdata/nested-reusable-workflow/.github/workflows/nested.yml` (+16 -0) ➕ `pkg/runner/testdata/nested-reusable-workflow/local.yml` (+9 -0) ➕ `pkg/runner/testdata/nested-reusable-workflow/push.yml` (+9 -0) </details> ### 📄 Description When a reusable workflow calls another local workflow using relative paths (uses: ./.github/workflows/...), act was incorrectly looking for the nested workflow in the caller's repository instead of the reusable workflow's repository. This fix ensures that local workflow references are resolved relative to the reusable workflow's location by passing the correct working directory to the reusable workflow runner. Fixes https://github.com/nektos/act/issues/1875 --- <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#2609
No description provided.