ci: rebase before pushing release/version-docs commits#3614
Merged
Conversation
Why: The release job pushes a `chore(release): update internal dependencies [skip ci]` commit via EndBug; the version-docs job pushes a `docs: update docs for ... version` commit via raw `git push`. If anything else lands on master between checkout and push in either job, the push is rejected with `cannot lock ref` — non-fast-forward, even when the service-account bypass succeeds. For the EndBug step, add `pull: '--rebase --autostash'`. For the raw git step, add `git pull --rebase --autostash` before `git push`.
barjin
approved these changes
Apr 30, 2026
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.
Summary
releasejob: addpull: '--rebase --autostash'to theEndBug/add-and-commitstep so the internal-deps commit survives a concurrent ref update on master.version-docsjob: switch the raw-gitCommit and push the version snapshotstep over toEndBug/add-and-commit@v10(matching the rest of the workflow and our other repos), withpull: '--rebase --autostash'to handle the same race.version-docsjob: also fix the commit message to use the actual version number. Previously the message used${{ inputs.version }}, which on this workflow is the release-type choice (patch/minor/major/custom), so the commit was landing as e.g.docs: update docs for minor version. TheSnapshot the current versionstep already reads the real version fromlerna.json; export it via$GITHUB_ENVand use${{ env.VERSION }}in the commit message.Context
Same race that bit
apify/apify-client-jsin run 25114327598:The bypass logs
remote: Bypassed rule violations for refs/heads/master— so it's not permissions, it's just non-fast-forward because something landed on master between checkout and push. The version-docs job is especially exposed since it runs afterreleasehas already pushed once.🤖 Generated with Claude Code