Skip to content

Commit c1dc0de

Browse files
committed
fix(ci): explicit branch so it also works in detached mode
1 parent 6662faf commit c1dc0de

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/reusable_publish_changelog.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
permissions:
77
contents: write
88

9+
env:
10+
BRANCH: master
11+
912
jobs:
1013
publish_changelog:
1114
# Force Github action to run only a single job at a time (based on the group name)
@@ -24,7 +27,7 @@ jobs:
2427
git config user.email "[email protected]"
2528
git config pull.rebase true
2629
git config remote.origin.url >&- || git remote add origin https://github.com/$origin
27-
git pull --rebase
30+
git pull --rebase origin $BRANCH
2831
- name: "Generate latest changelog"
2932
run: make changelog
3033
- name: Pause
@@ -34,4 +37,4 @@ jobs:
3437
git add CHANGELOG.md
3538
git commit -m "chore(ci): update changelog with latest changes"
3639
git pull
37-
git push origin HEAD:refs/heads/master
40+
git push origin HEAD:refs/heads/$BRANCH

0 commit comments

Comments
 (0)