fix(actionlint): use github.workflow_ref (not workflow_sha) for cross-repo checkout - #21
Merged
Merged
Conversation
…-repo checkout `validate-reusable-inputs` vendors pinpredict/.github at the workflow's own ref to resolve `uses: ./...` against this repo (not the caller). The previous revision used `github.workflow_sha`, which in cross-repo reusable calls returns the *caller's* head SHA — fine for self-CI (caller and this repo are the same) but breaks every downstream consumer with `not our ref <caller-sha>` when actions/checkout tries to fetch the caller's SHA from pinpredict/.github. Parse `github.workflow_ref` instead — its shape is `<owner>/<repo>/.github/workflows/<file>.yml@<git-ref>` — and pass the ref portion to actions/checkout. Resolves to `refs/heads/main` for downstream `@main` callers, `refs/pull/N/merge` for self-CI PRs, and the SHA when pinned. Observed failures: every CI run on trading-reports main since #4 merged; service-template PR #12 (the first PR since the actionlint shim landed).
2 tasks
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.
Summary
validate-reusable-inputsvendorspinpredict/.githubat the workflow's own ref so thatuses: ./<vendored>resolves against this repo rather than the caller. The previous revision (commit73a31ca) usedref: \${{ github.workflow_sha }}, on the assumption thatworkflow_shais "the @ref SHA when invoked from a downstream caller." It isn't — in cross-repo reusable calls,github.workflow_shareturns the caller's head SHA, soactions/checkoutfails withnot our ref <caller-sha>when trying to fetch it frompinpredict/.github.Switch to parsing
github.workflow_ref. Shape:Splitting on
@yields a refactions/checkoutresolves against this repo —refs/heads/mainfor downstream@maincallers,refs/pull/N/mergefor self-CI PRs, a SHA when pinned.Observed impact
Live failures since
73a31carolled out (2026-06-08):trading-reportsmain— every CI run since feat: add language-setup composite actions #4 merged.service-templatePR ci(pre-commit): seed hook-env cache on push to default branch #12 — first PR run since the actionlint shim landed.Test plan
🤖 Generated with Claude Code