1111 required : false
1212 default : ' '
1313
14+ concurrency :
15+ group : append-changelog
16+ cancel-in-progress : false
17+
1418jobs :
1519 append-changelog :
1620 runs-on : ubuntu-latest
21+ permissions :
22+ contents : write
23+ pull-requests : read
1724 # only proceed if merge event or manual run
1825 if : |
1926 (github.event_name == 'pull_request' && github.event.pull_request.merged == true) ||
2330 uses : actions/checkout@v4
2431 with :
2532 fetch-depth : 0
26- token : ${{ secrets.BOT_TOKEN }}
33+ ref : master
34+ token : ${{ secrets.GITHUB_TOKEN }}
2735
2836 - name : Set up Python
2937 uses : actions/setup-python@v4
@@ -36,17 +44,19 @@ jobs:
3644 - name : Run changelog updater
3745 env :
3846 GITHUB_REPOSITORY : ${{ github.repository }}
39- BOT_TOKEN : ${{ secrets.BOT_TOKEN }}
47+ BOT_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4048 GITHUB_EVENT_PATH : ${{ github.event_path }}
4149 run : |
4250 python scripts/update_changelog.py \
4351 --pr-numbers "${{ github.event.inputs.pr_numbers }}"
4452 - name : Commit & push
45- env :
46- TOKEN : ${{ secrets.BOT_TOKEN }}
4753 run : |
48- git config user.name "github-bot"
49- git config user.email "bot@users.noreply.github.com"
54+ git config user.name "github-actions[ bot] "
55+ git config user.email "41898282+github-actions[ bot] @users.noreply.github.com"
5056 git add CHANGELOG.md
57+ if git diff --cached --quiet; then
58+ echo "No changelog changes to commit."
59+ exit 0
60+ fi
5161 git commit -m "docs: update CHANGELOG"
52- git push https://x-access-token:${TOKEN}@github.com/${{ github.repository }} HEAD:${{ github.ref }}
62+ git push origin HEAD:master
0 commit comments