Skip to content

Use state to persist inputs used in the post step - #443

Open
Iain Galloway (iaingalloway) wants to merge 1 commit into
devcontainers:mainfrom
iaingalloway:main
Open

Iain Galloway (iaingalloway) wants to merge 1 commit into
devcontainers:mainfrom
iaingalloway:main

Conversation

@iaingalloway

Copy link
Copy Markdown

There is a known bug in GHA actions/runner. When a node action with a post step is called via a nested composite action, the runner restores the wrong INPUT_* environment for the post step, potentially resulting in images being incorrectly pushed or not pushed, or the wrong tags being pushed.

This PR uses a workaround used in the first-party action github/codeql-action, instead of using core.getInput in the post step, the relevant values are stored in the main step using core.saveState, and then loaded in the post step using core.getState

Fixes #442

There is a known bug in GHA actions/runner. When a node action with a post step
is called via a nested composite action, the runner restores the wrong INPUT_*
environment for the post step, potentially resulting in images being incorrectly
pushed or not pushed, or the wrong tags being pushed.

This commit uses a workaround used in the first-party action github/codeql-action,
instead of using `core.getInput` in the post step, the relevant values are stored
in the main step using `core.saveState`, and then loaded in the post step using
`core.getState`

Fixes devcontainers#442

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant