Repository navigation
ci(sync): check out the triggering ref, not dev, in the sync job - #37
Merged
Merged
Conversation
The sync job checked out `dev` and then invoked the local action `./.github/actions/setup-devkit-toolchain`. GitHub resolves `uses: ./…` against the checked-out workspace, so once `main` gained `.github/actions/` (#32) and `dev` had not, the job failed with "Can't find 'action.yml' … under .github/actions/setup-devkit-toolchain". That deadlocked the sync: the PR that would carry the action onto `dev` is the very PR this job opens, so `dev` could never catch up. Drop `ref: dev` so the workspace is the triggering `main` SHA, where the action is guaranteed to exist. No step needs dev's working tree — the re-check, conflict detection, sync-branch creation and PR steps all operate on remote refs (origin/main, origin/dev) or the GitHub API. This file is the devkit scaffold verbatim, so the defect ships to every scaffolded repo; filed upstream as vig-os/devkit#1034. This is the local fix so development can continue without waiting on a devkit release. Refs: #36
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.
Unblock
Sync main to devdevis stuck 4 commits behindmainand cannot catch up: the sync workflow hasbeen failing on every push to
mainsince #32.Failing run: https://github.com/vig-os/commit-action/actions/runs/29314999211
The bug
The
syncjob checks outdev, then invokes a local composite action:GitHub resolves
uses: ./…against the checked-out workspace, not theworkflow's ref.
.github/actions/landed onmainwith the devkit 1.1.0 adoption(#32) and does not exist on
dev, so the step dies:resolve-toolchainandcheckpass because they check out the default ref(
main), where the action does exist. Onlysyncpinsdev.This is a bootstrap deadlock — the only thing that would carry the action onto
devis the very sync PR this job can no longer open. It cannot self-heal.The fix
Drop
ref: dev, so the workspace is the triggeringmainSHA where the action isguaranteed to exist.
Nothing downstream reads dev's working tree. Every subsequent step already
operates on remote refs or the API:
git fetch origin main dev→git rev-list --count origin/main ^origin/devgit merge-tree --write-tree origin/dev origin/maingit checkout -b "$SYNC_BRANCH" origin/maingh/ REST APIfetch-depth: 0and the commit-app token are unchanged, so merge-base and pushbehavior are identical. The job now builds against the newer tree — the one whose
actions it actually references.
Upstream
This file is the devkit scaffold template verbatim (
diffagainstassets/workspace/.github/workflows/sync-main-to-dev.ymlondevkit@mainisempty), so the defect ships to every scaffolded repo. The devkit's own copy has the
same pattern with
./.github/actions/setup-env— latent, one rename away fromfiring.
Filed upstream as vig-os/devkit#1034. This PR is the local fix so
development can continue without waiting on a devkit release. A header comment and
a step comment mark the divergence so a future re-scaffold does not silently revert
it.
Verification
just precommitfully green locally (incl.yamllint --strict,check-yaml).main: merging this PR itself triggersSync main to dev, which should now open thechore/sync-main-to-dev-*PR thatfinally brings
.github/actions/ontodev.Refs: #36