fix(ci): drop fetch-tags on checkout — breaks workflow_dispatch on a tag#61
Merged
Merged
Conversation
`actions/checkout@v4` with `fetch-tags: true` triggered via `workflow_dispatch --ref v0.2.0` fails the initial git fetch with "Cannot fetch both <sha> and refs/tags/v0.2.0 to refs/tags/v0.2.0" — git refuses to fetch the SHA and the tag pointing at it in the same refspec. The setting was added so the SPA build's `git tag --points-at HEAD` resolves on shallow checkouts, but when the workflow is triggered by a `v*` tag (push or dispatch), the tag is already the checked-out ref. Default checkout suffices.
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.
actions/checkout@v4withfetch-tags: truetriggered viaworkflow_dispatch --ref v0.2.0fails the initial git fetch:git refuses to fetch the SHA and the tag pointing at it in the same refspec.
The setting was added so the SPA build's
git tag --points-at HEADresolves on shallow checkouts, but when the workflow is triggered by av*tag (push or dispatch), the tag is already the checked-out ref. Default checkout suffices.After this merges
To rebuild the missing v0.2.0 images, force-move the tag to the new main commit (which contains this fix):
That force-push (from a real git client, not
GITHUB_TOKEN) triggers the Docker workflow against the fixeddocker.ymland builds:0.2.0,:0.2,:0,:latestcorrectly. The npm publish for v0.2.0 already happened ona7f7ad1, so this is only catching up the Docker artifacts — npm isn't affected by the tag move.