Skip to content

Commit 2df1063

Browse files
committed
Version bump check only enforces on PRs targeting main
PRs targeting dev (or other branches) trigger the workflow but skip the check with a green pass, so the status check shows up without blocking non-main PRs.
1 parent 78c4e3a commit 2df1063

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/version-bump-check.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,26 @@ name: Version Bump Check
22

33
on:
44
pull_request:
5-
branches: [main]
5+
branches: [main, dev]
66

77
jobs:
88
version-bump-check:
99
runs-on: ubuntu-latest
1010
steps:
11+
- name: Skip for non-main targets
12+
if: github.base_ref != 'main'
13+
run: |
14+
echo "PR targets '${{ github.base_ref }}', not 'main'. Skipping version bump check."
15+
exit 0
16+
1117
- name: Checkout PR branch
18+
if: github.base_ref == 'main'
1219
uses: actions/checkout@v4
1320
with:
1421
fetch-depth: 0
1522

1623
- name: Check version bump
24+
if: github.base_ref == 'main'
1725
run: |
1826
echo "Checking that all version numbers have been incremented..."
1927

0 commit comments

Comments
 (0)