Skip to content

Commit 7a44fa6

Browse files
Update staging version bump workflow for branches
1 parent 63eb238 commit 7a44fa6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: Bump Version
33
on:
44
push:
55
branches:
6-
- staging-release-1
6+
- staging-release
7+
- staging-release-*
78
workflow_dispatch:
89

910
jobs:
@@ -23,6 +24,7 @@ jobs:
2324
with:
2425
fetch-depth: 0
2526
token: ${{ secrets.GITHUB_TOKEN }}
27+
ref: ${{ github.ref }} # pin to exact triggering ref, avoids implicit merge with master
2628

2729
- name: Get current branch name
2830
id: branch
@@ -52,7 +54,7 @@ jobs:
5254
- name: Run bump_versions.py
5355
id: bump
5456
run: |
55-
python bump_version.py \
57+
python bump_versions.py \
5658
"${{ steps.previoustag.outputs.tag }}" \
5759
"${{ steps.branch.outputs.name }}" \
5860
> /tmp/version_bumped.properties
@@ -65,9 +67,11 @@ jobs:
6567
run: |
6668
git config user.name "github-actions[bot]"
6769
git config user.email "github-actions[bot]@users.noreply.github.com"
70+
git status
71+
git log --oneline -5 # show last 5 commits so we can see history clearly
6872
git add version.properties
6973
git diff --cached --quiet || git commit -m "chore: bump version [skip ci]"
70-
git push origin ${{ steps.branch.outputs.name }}
74+
git push origin HEAD:${{ steps.branch.outputs.name }} # explicit HEAD:branch avoids any detached state issues
7175
7276
- name: Open PR to master
7377
uses: peter-evans/create-pull-request@v7

0 commit comments

Comments
 (0)