fix(ci): use the self-repository prefix in renovate-automerge - #406
Merged
Conversation
`renovate-automerge.yml` was added in #400 with a workspace-relative `uses: ./.github/workflows/reusable-renovate-automerge.yml`, which the repository's own `scripts/check-self-repository-references.py` rejects. That left both the `Lint GitHub Actions` and `pytest` required checks red on `main`, blocking every subsequent PR. Switch to the documented `$/` self-repository prefix used by the five other in-repo reusable workflow calls (pkg-cadence, promote-bluefin-stable, reusable-promote-squash, validate-renovate). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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.
What does this change?
One-line fix:
.github/workflows/renovate-automerge.yml:34used a workspace-relativeuses: ./…where this repo requires the$/self-repository prefix.The failure
mainis currently red for every PR. Two required checks fail on the same finding:Lint GitHub Actions / Check self-repository referencespytest :: tests/test_self_repository_references.py::test_repository_has_no_invalid_self_referencesOrigin
Introduced by #400 (
ci(actions): make mergeraptor auto-merge actually fire on main), confirmed viagit log -S 'uses: ./.github/workflows/reusable-renovate-automerge.yml'. (I initially attributed it to #401 in a comment on #405 — that was just the most recent commit onmain; #400 is the actual source.)scripts/check-self-repository-references.pymatches^\s*uses:\s*(?:projectbluefin/actions/|\./)across.github/,actions/, andbootc-build/, so the./form is rejected by design. The rule is documented indocs/skills/composite-actions/reusable-workflow.md—$/resolves from the repository and commit that owns the running workflow, so a reusable workflow called by a consumer cannot accidentally resolve./against the consumer's checked-out workspace.The fix
./→$/, matching the five other in-repo reusable workflow calls already onmain:pkg-cadence.yml:22,30promote-bluefin-stable.yml:21reusable-promote-squash.yml:445validate-renovate.yml:20Nothing else changes: same reusable workflow, same
with:inputs, samesecrets:block.$/for reusable workflow calls needs runner ≥ 2.336.0, already satisfied — the five references above are live onmaintoday.Verification
python3 scripts/check-self-repository-references.py→Self-repository references use $/.(exit 0)python -m pytest tests/test_self_repository_references.py→ 3 passedactionlint(whole repo) → exit 0 (the$/parser ignores in.github/actionlint.yamlalready cover this form)pre-commit run --files .github/workflows/renovate-automerge.yml→ all hooks passConsumer validation
Not required:
consumer-validation.ymlonly demands evidence forbootc-build/*/action.ymland.github/workflows/reusable-*.yml. This file is neither.Kept deliberately separate from #405 (the
publish_stream_tagstream-tag leak fix) so neither change carries the other's risk.Checklist
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com