File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,15 +24,32 @@ jobs:
2424 run : |
2525 bash scripts/update_changelog.sh
2626
27- - name : Create Pull Request
28- uses : peter-evans/create-pull-request@v6
29- with :
30- commit-message : Update changelog
31- title : Update changelog
32- body : |
33- This PR updates the changelog with recent changes.
34-
35- Auto-generated by workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
36- branch : changelog-update-${{ github.run_number }}
37- delete-branch : true
38- team-reviewers : coc-committee
27+ - name : Create and push branch with changelog update
28+ shell : bash
29+ env :
30+ GH_TOKEN : ${{ github.token }}
31+ run : |
32+ set -euo pipefail
33+
34+ if git diff --quiet -- CHANGELOG.md; then
35+ echo "No changelog updates to commit."
36+ exit 0
37+ fi
38+
39+ BRANCH="changelog-update-${{ github.run_number }}"
40+
41+ git config user.name "github-actions[bot]"
42+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
43+
44+ git checkout -b "${BRANCH}"
45+ git add CHANGELOG.md
46+ git commit -m "Update changelog"
47+ git push origin "${BRANCH}"
48+
49+ gh pr create \
50+ --title "Update changelog" \
51+ --body "This PR updates the changelog with recent changes.
52+
53+ Auto-generated by workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
54+ --base main \
55+ --head "${BRANCH}"
You can’t perform that action at this time.
0 commit comments