Files
.github
.vscode
cmd
pkg
artifacts
common
container
exprparser
model
runner
res
testdata
act-composite-env-test
actions
actions-environment-and-context-tests
docker
Dockerfile
action.yml
entrypoint.sh
js
push.yml
basic
checkout
commands
composite-fail-with-output
container-hostname
defaults-run
dir with spaces
ensure-post-steps
env-and-path
evalenv
evalmatrix
evalmatrix-merge-array
evalmatrix-merge-map
evalmatrixneeds
evalmatrixneeds2
fail
if-env-act
if-expressions
issue-104
issue-1195
issue-122
issue-141
issue-228
issue-597
issue-598
job-container
job-container-invalid-credentials
job-container-non-root
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-include-exclude
networking
node
non-existent-action
outputs
parallel
pull-request
python
remote-action-composite-js-pre-with-defaults
remote-action-docker
remote-action-js
runs-on
secrets
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
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
workdir
workflow_dispatch
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
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
.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
act-cli.nuspec
codecov.yml
go.mod
go.sum
install.sh
main.go
Markus Wolf e360811570 refactor: remove composite action runcontext workaround ()
* refactor: remove composite action runcontext workaround

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.

* test: check env-vars for local js and docker actions

* test: test remote docker and js actions

* fix: merge github context into env when read and setup

* refacotr: simplify composite context setup

* test: use a map matcher to test input setup

* fix: restore composite log output

Since we create a new line writer, we need to log the raw_output as well.
Otherwise no output will be available from the log-writer

* fix: add RunContext JobName to fill GITHUB_JOBNAME

* test: use nektos/act-test-actions

* fix: allow masking values in composite actions

To allow masking of values from composite actions, we need
to use a custom job logger with a reference to the masked
values for the composite run context.

* refactor: keep existing logger for composite actions

To not introduce another new logger while still be able to use
the masking from the composite action, we add the masks to
the go context. To leverage that context, we also add the context
to the log entries where the valueMasker then could get the actual
mask values.

With this way to 'inject' the masked values into the logger, we do
- keep the logger
- keep the coloring
- stay away from inconsistencies due to parallel jobs

* fix: re-add removed color increase

This one should have never removed :-)

* fix: add missing ExtraPath attribute

* fix: merge run context env into composite run context env

This adds a test and fix for the parent environment. It should be
inherited by the composite environment.

* test: add missing test case

* fix: store github token next to secrets

We must not expose the secrets to composite actions, but the
`github.token` is available inside composite actions.
To provide this we store the token in the config and create it in
the GithubContext from there.

The token can be used with `github.token` but is not available as
`secrets.GITHUB_TOKEN`.

This implements the same behavior as on GitHub.

Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
Co-authored-by: Marcus Noll <markus.noll@new-work.se>

* fixup! fix: allow masking values in composite actions

* style: use tabs instead of spaces to fix linter errors

Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
Co-authored-by: Marcus Noll <markus.noll@new-work.se>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-05-11 19:06:05 +00:00
..