.github
.vscode
cmd
pkg
artifacts
common
container
exprparser
lookpath
model
runner
res
testdata
.github
GITHUB_ENV-use-in-env-ctx
GITHUB_STATE
act-composite-env-test
actions
actions-environment-and-context-tests
basic
checkout
commands
composite-fail-with-output
container-hostname
defaults-run
dir with spaces
do-not-leak-step-env-in-composite
docker-action-custom-path
ensure-post-steps
env-and-path
environment-files
environment-files-parser-bug
environment-variables
evalenv
evalmatrix
evalmatrix-merge-array
evalmatrix-merge-map
evalmatrixneeds
evalmatrixneeds2
fail
if-env-act
if-expressions
input-from-cli
inputs-via-env-context
issue-104
issue-1195
issue-122
issue-141
issue-1595
issue-228
issue-597
issue-598
job-container
job-container-invalid-credentials
job-container-non-root
job-needs-context-contains-result
job-nil-step
job-status-check
local-action-docker-url
local-action-dockerfile
local-action-js
local-action-via-composite-dockerfile
localdockerimagetest_
mask-values
matrix
matrix-exitcode
matrix-include-exclude
networking
nix-prepend-path
no-panic-on-invalid-composite-action
node
non-existent-action
outputs
parallel
path-handling
pull-request
python
remote-action-composite-js-pre-with-defaults
remote-action-docker
remote-action-js
remote-action-js-node-user
runs-on
secrets
set-env-new-env-file-per-step
set-env-step-env-override
shells
steps-context
uses-action-with-pre-and-post-step
uses-and-run-in-one-step
uses-composite
uses-composite-with-error
uses-composite-with-inputs
uses-composite-with-pre-and-post-steps
action-with-pre-and-post
action.yml
main.js
post.js
pre.js
composite_action
last-action
push.yml
uses-docker-url
uses-github-empty
uses-github-full-sha
uses-github-noref
uses-github-path
uses-github-root
uses-github-short-sha
uses-nested-composite
uses-workflow
windows-add-env
windows-prepend-path
workdir
workflow_dispatch
workflow_dispatch-scalar
workflow_dispatch-scalar-composite-action
workflow_dispatch_no_inputs_mapping
action.go
action_composite.go
action_test.go
command.go
command_test.go
container_mock_test.go
expression.go
expression_test.go
job_executor.go
job_executor_test.go
logger.go
reusable_workflow.go
run_context.go
run_context_test.go
runner.go
runner_test.go
step.go
step_action_local.go
step_action_local_test.go
step_action_remote.go
step_action_remote_test.go
step_docker.go
step_docker_test.go
step_factory.go
step_factory_test.go
step_run.go
step_run_test.go
step_test.go
workflowpattern
.actrc
.editorconfig
.gitignore
.gitleaksignore
.golangci.yml
.goreleaser.yml
.markdownlint.yml
.mega-linter.yml
.mergify.yml
.prettierignore
.prettierrc.yml
CODEOWNERS
CONTRIBUTING.md
IMAGES.md
LICENSE
Makefile
README.md
VERIFICATION
VERSION
act-cli.nuspec
codecov.yml
go.mod
go.sum
install.sh
main.go
* feat: add post step to actions and add state command This commit includes requried changes for running post steps for local and remote actions. This allows general cleanup work to be done after executing an action. Communication is allowed between this steps, by using the action state. * feat: collect pre and post steps for composite actions * refactor: move composite action logic into own file * refactor: restructure composite handling * feat: run composite post steps during post step lifecycle * refactor: remove duplicate log output * feat: run all composite post actions in a step Since composite actions could have multiple pre/post steps inside, we need to run all of them in a single top-level pre/post step. This PR includes a test case for this and the correct order of steps to be executed. * refactor: remove unused lines of code * refactor: simplify test expression * fix: use composite job logger * fix: make step output more readable * fix: enforce running all post executor To make sure every post executor/step is executed, it is chained with it's own Finally executor. * fix: do not run post step if no step result is available Having no step result means we do not run any step (neither pre nor main) and we do not need to run post. * fix: setup defaults If no pre-if or post-if is given, it should default to 'always()'. This could be set even if there is no pre or post step. In fact this is required for composite actions and included post steps to run. * fix: output step related if expression * test: update expectation * feat: run pre step from actions (#1110) This PR implements running pre steps for remote actions. This includes remote actions using inside local composite actions. * fix: set correct expr default status checks For post-if conditions the default status check should be always(), while for all other if expression the default status check is success() References: https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runspost-if * fix: remove code added during rebase
4 lines
158 B
JavaScript
4 lines
158 B
JavaScript
const { appendFileSync } = require('fs');
|
|
const step = process.env['INPUT_STEP'];
|
|
appendFileSync(process.env['GITHUB_ENV'], `;${step}`, { encoding:'utf-8' })
|