Skip to content

iaingalloway/devcontainers-ci-inputs-mcve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

MCVE: devcontainers/ci post hook pushes wrong image tag through nested composites

Minimal reproduction of actions/runner#3514 / actions/runner#2030 as it affects devcontainers/ci.

Structure

workflow
└── outer-composite                   (no inputs)
    └── inner-composite               (input: image-tag=foo)
        └── devcontainers/ci          (node action, imageTag: ${{ inputs.image-tag }})
            ├── main: builds :foo
            └── post: pushes ???

Observed behaviour

[main] INPUT_IMAGETAG=foo  → builds ghcr.io/.../devcontainer:foo  ✓
[post] INPUT_IMAGETAG=""   → defaults to "latest"
                           → tries to push ghcr.io/.../devcontainer:latest  ✗ (never built)

Expected behaviour

[post] INPUT_IMAGETAG=foo  → pushes ghcr.io/.../devcontainer:foo  ✓

Why it happens

Because of actions/runner#2030, the inner composite receives the wrong context during its post hook. The action then attempts to default to "latest" instead of using the value from the main step, but no manifest with this tag exists.

Workaround

Persist inputs in the main step using core.saveState, then read from STATE_* in the post step instead of INPUT_*. See github/codeql-action#2557 for a real-world example.

About

An MVCE for an issue with composite action inputs in devcontainers/ci

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors