[PR #712] [MERGED] Refactor local, composite actions and run steps #1573

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/712
Author: @ChristopherHX
Created: 5/29/2021
Status: Merged
Merged: 6/10/2021
Merged by: @mergify[bot]

Base: masterHead: refactor/actions


📝 Commits (3)

  • 6d8b2e0 Refactor local, composite actions and run steps
  • c47dd0d Merge branch 'master' into refactor/actions
  • ee466b3 Merge branch 'master' into refactor/actions

📊 Changes

4 files changed (+26 additions, -24 deletions)

View changed files

📝 pkg/runner/step_context.go (+23 -24)
📝 pkg/runner/testdata/local-action-docker-url/push.yml (+1 -0)
📝 pkg/runner/testdata/local-action-dockerfile/push.yml (+1 -0)
📝 pkg/runner/testdata/local-action-js/push.yml (+1 -0)

📄 Description

This PR makes my previous PR redundant and conflicts with it.

Skip docker cp for local actions and use their correct path
Allow cloning local actions where you wish, (needs a lot of more changes)
Defines GITHUB_ACTION_PATH also for nodejs actions
Evaluate Env of composite action
Evaluate Run of composite action correctly
Evaluate Shell of run steps
Evaluate WorkingDirectory of run steps
Resolves #441
Resolves #640
Resolves #664
Resolves #708
Replaces #709

Known issues

  • composite step's properties are evaluated twice, this make escaping ${{'${{Test}}'}} impossible (this doesn't work in act yet), this is a bug / feature of act

path.Join always use / to concat path's and is better than +

If the workdir is bound to our repository then we don't need to copy the file

Act should never copy local actions, because they can come from anywhere via checkout, git clone etc.

Merging this might resolve this known issue:
https://github.com/nektos/act#module_not_found
(seems like we would need to copy files from the container to host)
I have no experience in golang

Update:
fixes #733


🔄 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/712 **Author:** [@ChristopherHX](https://github.com/ChristopherHX) **Created:** 5/29/2021 **Status:** ✅ Merged **Merged:** 6/10/2021 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `refactor/actions` --- ### 📝 Commits (3) - [`6d8b2e0`](https://github.com/nektos/act/commit/6d8b2e0ef6db7f4e765b50fa014008900b32339b) Refactor local, composite actions and run steps - [`c47dd0d`](https://github.com/nektos/act/commit/c47dd0d8ddbcfac407130f97a7e770fc05fa1e84) Merge branch 'master' into refactor/actions - [`ee466b3`](https://github.com/nektos/act/commit/ee466b331fed9ef9bd723831dd7bf6b3537cb732) Merge branch 'master' into refactor/actions ### 📊 Changes **4 files changed** (+26 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `pkg/runner/step_context.go` (+23 -24) 📝 `pkg/runner/testdata/local-action-docker-url/push.yml` (+1 -0) 📝 `pkg/runner/testdata/local-action-dockerfile/push.yml` (+1 -0) 📝 `pkg/runner/testdata/local-action-js/push.yml` (+1 -0) </details> ### 📄 Description This PR makes my previous PR redundant and conflicts with it. Skip docker cp for local actions and use their correct path ~~Allow cloning local actions where you wish~~, (needs a lot of more changes) Defines GITHUB_ACTION_PATH also for nodejs actions Evaluate Env of composite action Evaluate Run of composite action correctly Evaluate Shell of run steps Evaluate WorkingDirectory of run steps Resolves #441 Resolves #640 Resolves #664 Resolves #708 Replaces #709 ~~**Known issues**~~ - ~~composite step's properties are evaluated twice, this make escaping `${{'${{Test}}'}}` impossible (this doesn't work in act yet)~~, this is a bug / feature of act ~~_`path.Join` always use `/` to concat path's and is better than +_~~ > If the workdir is bound to our repository then we don't need to copy the file Act should never copy local actions, because they can come from anywhere via checkout, git clone etc. ~~Merging this might resolve this known issue: https://github.com/nektos/act#module_not_found~~ (seems like we would need to copy files from the container to host) _I have no experience in golang_ Update: fixes #733 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:51:46 +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#1573
No description provided.