Skip to content

ci: let callers outside main supply the CI scripts ref - #81

Merged
Christopher Obbard (obbardc) merged 1 commit into
mainfrom
wip/obbardc/fix-ci-ref-for-external-callers
Aug 27, 2026
Merged

ci: let callers outside main supply the CI scripts ref#81
Christopher Obbard (obbardc) merged 1 commit into
mainfrom
wip/obbardc/fix-ci-ref-for-external-callers

Conversation

@obbardc

Copy link
Copy Markdown
Contributor

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.

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]>
@obbardc

Copy link
Copy Markdown
Contributor Author

This is required by #77

@obbardc
Christopher Obbard (obbardc) merged commit db0b415 into main Aug 27, 2026
3 checks passed
@obbardc
Christopher Obbard (obbardc) deleted the wip/obbardc/fix-ci-ref-for-external-callers branch August 27, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants