Repository navigation
Checkout spel's own source in reusable build workflow - #840
Merged
lorengordon merged 2 commits intoSep 29, 2026
Merged
lorengordon merged 2 commits into
lorengordon merged 2 commits into
Conversation
When build.yml is invoked as a reusable workflow via workflow_call from another repo (e.g. amigen9), a bare actions/checkout step defaults to checking out the CALLER's repository and sha, not spel's own. This broke the build job (Makefile.spel: No such file or directory) and would break release-pr (missing manifests/ dir, .bumpversion.cfg, etc). Fix by pinning checkout to job.workflow_repository/job.workflow_sha, which always resolve to the repo/commit defining the current job, regardless of which repo/ref invoked the workflow.
eemperor
approved these changes
Sep 29, 2026
Contributor
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
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.
Problem
When
build.ymlis invoked as a reusable workflow viaworkflow_callfrom another repository (e.g.amigen9), the bareactions/checkoutsteps in thebuildandrelease-prjobs default to checking out${{ github.repository }}@${{ github.sha }}. In aworkflow_callcontext, those default context values resolve to the calling repository/ref (e.g. amigen9), not spel's own.This caused CI failures such as:
because
Makefile.spelonly exists in spel's own repository.The
release-prjob has the same bug: it would attempt to move manifests into and open a PR against whatever repo happened to invoke the workflow, rather than spel's ownmanifests/directory and.bumpversion.cfg.Fix
Pin both checkout steps to
job.workflow_repository/job.workflow_sha, which per GitHub's contexts reference always resolve to the repository and commit that define the current job (i.e. spel's ownbuild.yml), regardless of which repository or ref invoked the workflow. This is GitHub's documented pattern for reusable workflows that need to access files co-located with the workflow definition.The
manifestsjob is unaffected since it only merges uploaded artifacts and has no checkout step.