File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ name: Bump Version
33on :
44 push :
55 branches :
6- - staging-release-1
6+ - staging-release
7+ - staging-release-*
78 workflow_dispatch :
89
910jobs :
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
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
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
You can’t perform that action at this time.
0 commit comments