Skip to content

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

Open
iaingalloway wants to merge 1 commit intodevcontainers:mainfrom
iaingalloway:main
Open

Use state to persist inputs used in the post step#443
iaingalloway wants to merge 1 commit intodevcontainers: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
@iaingalloway iaingalloway marked this pull request as ready for review April 22, 2026 09:44
@iaingalloway iaingalloway requested review from a team and stuartleeks as code owners April 22, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inputs are wrong in post step when action is called through a nested composite action

1 participant