mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[PR #1085] [MERGED] refactor: remove composite action runcontext workaround #1766
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1766
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/1085
Author: @KnisterPeter
Created: 3/29/2022
Status: ✅ Merged
Merged: 5/11/2022
Merged by: @mergify[bot]
Base:
master← Head:remove-composite-runcontext-workaround📝 Commits (10+)
4e89488refactor: remove composite action runcontext workaround96c95f1test: check env-vars for local js and docker actions0f07904test: test remote docker and js actions2f37c49fix: merge github context into env when read and setup36d8ac3refacotr: simplify composite context setupae15be2test: use a map matcher to test input setupd76c84dfix: restore composite log output056d840fix: add RunContext JobName to fill GITHUB_JOBNAMEb41d466test: use nektos/act-test-actionsff586d8fix: allow masking values in composite actions📊 Changes
23 files changed (+391 additions, -162 deletions)
View changed files
📝
cmd/root.go(+1 -0)📝
pkg/container/docker_run.go(+11 -0)📝
pkg/runner/action.go(+126 -60)📝
pkg/runner/action_test.go(+9 -22)📝
pkg/runner/expression.go(+2 -12)📝
pkg/runner/logger.go(+32 -4)📝
pkg/runner/run_context.go(+1 -54)📝
pkg/runner/run_context_test.go(+11 -1)📝
pkg/runner/runner.go(+1 -0)📝
pkg/runner/runner_test.go(+33 -0)📝
pkg/runner/step.go(+7 -3)📝
pkg/runner/step_run.go(+9 -6)➕
pkg/runner/testdata/act-composite-env-test/action1/action.yml(+21 -0)➕
pkg/runner/testdata/act-composite-env-test/action2/action.yml(+21 -0)➕
pkg/runner/testdata/act-composite-env-test/push.yml(+13 -0)➕
pkg/runner/testdata/actions-environment-and-context-tests/docker/Dockerfile(+5 -0)➕
pkg/runner/testdata/actions-environment-and-context-tests/docker/action.yml(+5 -0)➕
pkg/runner/testdata/actions-environment-and-context-tests/docker/entrypoint.sh(+26 -0)➕
pkg/runner/testdata/actions-environment-and-context-tests/js/action.yml(+5 -0)➕
pkg/runner/testdata/actions-environment-and-context-tests/js/index.js(+15 -0)...and 3 more files
📄 Description
The RunContext is cloned to execute a composite action with all its
steps in a similar context. This required some workaround, since
the command handler has kept a reference to the original RunContext.
This is solved now, by replacing the docker LogWriter with a proper
scoped LogWriter.
This prepares for a simpler setup of composite actions to be able
to create and re-create the composite RunContext for pre/main/post
action steps.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.