ci: let callers outside main supply the CI scripts ref - #81
Merged
Christopher Obbard (obbardc) merged 1 commit intoAug 27, 2026
Merged
Conversation
The "Checkout CI scripts" step resolved the CI branch as github.sha. In a reusable workflow that is the *caller's* commit, not the ref in the caller's 'uses:' line, so it only names a CI commit while the caller itself runs on main. daily.yml and release.yml both do, which is why this held. A caller on a packaging branch gets a packaging commit, which carries no ci/ tree at all. sparse-checkout treats absent paths as empty rather than as an error, so the checkout succeeds and the next step fails on a bare 'cp: cannot stat .ci-branch/ci/scripts/*.sh'. Add a ci-ref input for those callers. It defaults to empty and falls back to github.sha, so daily.yml and release.yml keep pinning the scripts to the exact commit that started the run. Guard the copy as well, so a ref without a CI tree reports what is actually wrong instead of a missing-file error. Signed-off-by: Christopher Obbard <[email protected]>
Christopher Obbard (obbardc)
requested a review
from Bjordis Collaku (bjordiscollaku)
August 27, 2026 20:30
Contributor
Author
|
This is required by #77 |
Bjordis Collaku (bjordiscollaku)
approved these changes
Aug 27, 2026
Christopher Obbard (obbardc)
deleted the
wip/obbardc/fix-ci-ref-for-external-callers
branch
August 27, 2026 21:05
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.
The "Checkout CI scripts" step resolved the CI branch as github.sha. In a reusable workflow that is the caller's commit, not the ref in the caller's 'uses:' line, so it only names a CI commit while the caller itself runs on main. daily.yml and release.yml both do, which is why this held.
A caller on a packaging branch gets a packaging commit, which carries no ci/ tree at all. sparse-checkout treats absent paths as empty rather than as an error, so the checkout succeeds and the next step fails on a bare 'cp: cannot stat .ci-branch/ci/scripts/*.sh'.
Add a ci-ref input for those callers. It defaults to empty and falls back to github.sha, so daily.yml and release.yml keep pinning the scripts to the exact commit that started the run. Guard the copy as well, so a ref without a CI tree reports what is actually wrong instead of a missing-file error.