fix(ci): chain-image parses tag from scrape-pack run-name#219
Merged
Conversation
The `gh api .../runs/<id> --jq '.inputs.tag'` read in chain-image's Resolve-tag step always returns null — the runs REST endpoint does NOT expose workflow_dispatch inputs. Latent since #209; surfaced once #217 made chain-image actually fire. Embed inputs.tag in scrape-pack.yml's top-level run-name (`scrape-pack (v<x.y.z>)` or `scrape-pack (cache-warm)`), then parse it out of `github.event.workflow_run.display_title` on the chain-image side. Stable-tag filter and cache-warm gate preserved exactly. Closes #218.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #218.
Summary
chain-image.yml'sResolve tag from upstream runstep was readinggh api .../runs/<id> --jq '.inputs.tag', which always returnsnull— the runs REST endpoint does NOT expose workflow_dispatch inputs. Latent since refactor(ci): split docker image publish out of scrape-pack into its own concern-per-file workflow #209; surfaced after fix(ci): chain-release uses PAT so scrape-pack completion fires chain-image #217 made chain-image fire reliably (every release v0.7.0–v0.7.3 needed a manualgh workflow run docker-publish.ymlbecause chain-image's auto-dispatch was always skipped).scrape-pack.ymlgains a top-levelrun-name:that embedsinputs.tag:scrape-pack (v<x.y.z>)for tagged runs,scrape-pack (cache-warm)for empty-tag dispatches.chain-image.ymlparses the tag back out ofgithub.event.workflow_run.display_titleinstead of hitting the runs API. Stable-tag regex (^v[0-9]+\.[0-9]+\.[0-9]+$) and cache-warm skip gate preserved exactly. Old misleading comment about "the inputs field on the run JSON" deleted per the issue AC.Test plan
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/scrape-pack.yml'))"— OKpython3 -c "import yaml; yaml.safe_load(open('.github/workflows/chain-image.yml'))"— OKscrape-pack (v0.7.4)→ tag=v0.7.4,scrape-pack (cache-warm)→ cache-warm gate,scrape-pack (v1.2.3-rc1)→ stable-tag-filter skip, barescrape-pack(legacy in-flight runs) → cache-warm gate.gh workflow run scrape-pack.yml --ref main -f lib="" -f tag=""→ chain-image's Resolve-tag step should log "cache-warm path; skipping".gh workflow run scrape-pack.yml --ref main -f lib="" -f tag=v0.7.3→ chain-image'sDispatch docker-publish.ymlstep conclusion should besuccess(notskipped), and a fresh docker-publish run should appear shortly after.