[PR #1345] [MERGED] Fix composite input handling #1892

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1345
Author: @KnisterPeter
Created: 9/14/2022
Status: Merged
Merged: 10/6/2022
Merged by: @mergify[bot]

Base: masterHead: fix-input-handling


📝 Commits (6)

  • 236fb8c test: add test case for #1319
  • f7b2a00 fix: setup of composite inputs
  • 8f774d7 test: add simple remote composite action test
  • 5ca5cf8 refactor: move ActionRef and ActionRepository
  • b37ca3c refactor: remove unused properties
  • 7c076f9 Merge branch 'master' into fix-input-handling

📊 Changes

17 files changed (+246 additions, -149 deletions)

View changed files

📝 pkg/model/workflow.go (+27 -2)
📝 pkg/runner/action.go (+28 -51)
📝 pkg/runner/action_composite.go (+37 -46)
📝 pkg/runner/action_test.go (+2 -4)
📝 pkg/runner/expression.go (+17 -3)
📝 pkg/runner/run_context.go (+17 -23)
📝 pkg/runner/step.go (+5 -3)
📝 pkg/runner/step_action_local.go (+5 -2)
📝 pkg/runner/step_action_remote.go (+18 -12)
📝 pkg/runner/step_docker.go (+4 -0)
📝 pkg/runner/step_run.go (+4 -0)
📝 pkg/runner/step_test.go (+6 -0)
pkg/runner/testdata/uses-composite-with-inputs/action/action.yml (+19 -0)
pkg/runner/testdata/uses-composite-with-inputs/composite/action.yml (+22 -0)
pkg/runner/testdata/uses-composite-with-inputs/push.yml (+30 -0)
📝 pkg/runner/testdata/uses-composite/composite_action/action.yml (+2 -1)
📝 pkg/runner/testdata/uses-nested-composite/composite_action2/action.yml (+3 -2)

📄 Description

This change fixes the composite action setup handling of inputs.

All inputs are taken from the env now. The env is composed of
the 'level above'.
For example:

  • step env -> taken from run context
  • action env -> taken from step env
  • composite env -> taken from action env

Before this change the env setup for steps, actions and composite
run contexts was harder to understand as all parts looked into
one of these: parent run context, step, action, composite run context.

Now the 'data flow' is from higher levels to lower levels which should
make it more clean.

ToDo before merging

  • add remote composite action test
  • add test for event inputs (e.g. workflow_dispatch) Do not work in act yet. Here are some tests that show the support implemented: https://github.com/nektos/act/pull/1363
  • add proper support for ActionRepository and ActionRef

Fixes #1319


🔄 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/1345 **Author:** [@KnisterPeter](https://github.com/KnisterPeter) **Created:** 9/14/2022 **Status:** ✅ Merged **Merged:** 10/6/2022 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `fix-input-handling` --- ### 📝 Commits (6) - [`236fb8c`](https://github.com/nektos/act/commit/236fb8cab3ef5bd71ac5231c1c74d467d643d4c3) test: add test case for #1319 - [`f7b2a00`](https://github.com/nektos/act/commit/f7b2a0020224a51a3c499b6378cf900c4f63d18b) fix: setup of composite inputs - [`8f774d7`](https://github.com/nektos/act/commit/8f774d7e922a2de8f06b7724e777aa209b0a5861) test: add simple remote composite action test - [`5ca5cf8`](https://github.com/nektos/act/commit/5ca5cf8391365a36ec98f90382e24178897cb600) refactor: move ActionRef and ActionRepository - [`b37ca3c`](https://github.com/nektos/act/commit/b37ca3cd6bca1d80e80dbee6c483aceac088f141) refactor: remove unused properties - [`7c076f9`](https://github.com/nektos/act/commit/7c076f91f4092a96643789b832bea313b7c9b956) Merge branch 'master' into fix-input-handling ### 📊 Changes **17 files changed** (+246 additions, -149 deletions) <details> <summary>View changed files</summary> 📝 `pkg/model/workflow.go` (+27 -2) 📝 `pkg/runner/action.go` (+28 -51) 📝 `pkg/runner/action_composite.go` (+37 -46) 📝 `pkg/runner/action_test.go` (+2 -4) 📝 `pkg/runner/expression.go` (+17 -3) 📝 `pkg/runner/run_context.go` (+17 -23) 📝 `pkg/runner/step.go` (+5 -3) 📝 `pkg/runner/step_action_local.go` (+5 -2) 📝 `pkg/runner/step_action_remote.go` (+18 -12) 📝 `pkg/runner/step_docker.go` (+4 -0) 📝 `pkg/runner/step_run.go` (+4 -0) 📝 `pkg/runner/step_test.go` (+6 -0) ➕ `pkg/runner/testdata/uses-composite-with-inputs/action/action.yml` (+19 -0) ➕ `pkg/runner/testdata/uses-composite-with-inputs/composite/action.yml` (+22 -0) ➕ `pkg/runner/testdata/uses-composite-with-inputs/push.yml` (+30 -0) 📝 `pkg/runner/testdata/uses-composite/composite_action/action.yml` (+2 -1) 📝 `pkg/runner/testdata/uses-nested-composite/composite_action2/action.yml` (+3 -2) </details> ### 📄 Description This change fixes the composite action setup handling of inputs. All inputs are taken from the env now. The env is composed of the 'level above'. For example: - step env -> taken from run context - action env -> taken from step env - composite env -> taken from action env Before this change the env setup for steps, actions and composite run contexts was harder to understand as all parts looked into one of these: parent run context, step, action, composite run context. Now the 'data flow' is from higher levels to lower levels which should make it more clean. ### ToDo before merging - [x] add remote composite action test - [ ] ~~add test for event inputs (e.g. `workflow_dispatch`)~~ Do not work in act yet. Here are some tests that show the support implemented: https://github.com/nektos/act/pull/1363 - [x] add proper support for `ActionRepository` and `ActionRef` Fixes #1319 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:53:07 +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#1892
No description provided.