Skip to content

ci(bump-version): skip push on protected main instead of failing#5

Merged
barrulus merged 1 commit into
mainfrom
ci/bump-skip-push-on-main
Jun 9, 2026
Merged

ci(bump-version): skip push on protected main instead of failing#5
barrulus merged 1 commit into
mainfrom
ci/bump-skip-push-on-main

Conversation

@barrulus

@barrulus barrulus commented Jun 9, 2026

Copy link
Copy Markdown
Owner

The bump-on-merge workflow only ever targets main (its sole trigger is PRs into main), a protected branch. The github-actions[bot] can't push directly, so the Commit and push bump step failed on every merge (e.g. run 27233465820).

This gates the push: when the base branch is main, it logs a ::notice:: and exits 0 instead of attempting a rejected push. Pushes to unprotected branches are unchanged. Also moves base.ref into a quoted env var (BASE_REF) per the safe-interpolation pattern.

The bump-on-merge workflow only ever targets main (its sole trigger is
PRs into main), which is a protected branch — the github-actions bot
cannot push directly, so the 'Commit and push bump' step failed on every
merge. Gate the push: when the base branch is main, log a notice and exit
0 instead of attempting a rejected push. Pushes to unprotected branches
are unchanged. Also move base.ref into a quoted env var (BASE_REF).
@barrulus barrulus merged commit b1e483d into main Jun 9, 2026
2 checks passed
@barrulus barrulus deleted the ci/bump-skip-push-on-main branch June 9, 2026 20:40
@netlify

netlify Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploy Preview for bazgaars-fmg ready!

Name Link
🔨 Latest commit 5ac788c
🔍 Latest deploy log https://app.netlify.com/projects/bazgaars-fmg/deploys/6a2879f9bcf9c40008c32757
😎 Deploy Preview https://deploy-preview-5--bazgaars-fmg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant