Skip to content

ci: rebase before pushing release/version-docs commits#3614

Merged
B4nan merged 3 commits intomasterfrom
ci/release-rebase-on-push
Apr 30, 2026
Merged

ci: rebase before pushing release/version-docs commits#3614
B4nan merged 3 commits intomasterfrom
ci/release-rebase-on-push

Conversation

@B4nan
Copy link
Copy Markdown
Member

@B4nan B4nan commented Apr 29, 2026

Summary

  • release job: add pull: '--rebase --autostash' to the EndBug/add-and-commit step so the internal-deps commit survives a concurrent ref update on master.
  • version-docs job: switch the raw-git Commit and push the version snapshot step over to EndBug/add-and-commit@v10 (matching the rest of the workflow and our other repos), with pull: '--rebase --autostash' to handle the same race.
  • version-docs job: 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. The Snapshot the current version step already reads the real version from lerna.json; export it via $GITHUB_ENV and use ${{ env.VERSION }} in the commit message.

Context

Same race that bit apify/apify-client-js in run 25114327598:

remote rejected (cannot lock ref 'refs/heads/master': is at <new> but expected <old>)

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 after release has already pushed once.

🤖 Generated with Claude Code

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`.
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Apr 29, 2026
@B4nan B4nan requested a review from barjin April 29, 2026 15:13
@github-actions github-actions Bot added this to the 139th sprint - Tooling team milestone Apr 29, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Apr 29, 2026
Comment thread .github/workflows/release.yml Outdated
@B4nan B4nan merged commit 3644066 into master Apr 30, 2026
10 checks passed
@B4nan B4nan deleted the ci/release-rebase-on-push branch April 30, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants