From e123ba2667e75c2eaa85a1806c192ac8f22fb138 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Thu, 8 Aug 2024 11:47:28 -0700 Subject: [PATCH] Update update_changelog.yml --- .github/workflows/update_changelog.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update_changelog.yml b/.github/workflows/update_changelog.yml index f427b53..fdc02d5 100644 --- a/.github/workflows/update_changelog.yml +++ b/.github/workflows/update_changelog.yml @@ -17,6 +17,7 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.base.ref }} + fetch-depth: 0 - name: Extract and update Changelog id: modify-changelog @@ -44,10 +45,16 @@ jobs: done <<< "$changelog_section" > pr_info.txt awk '//{print; system("cat pr_info.txt"); next} 1' CHANGELOG.md > tmpfile && mv tmpfile CHANGELOG.md - - - name: Commit updated CHANGELOG.md - uses: stefanzweifel/git-auto-commit-action@v4 + + - uses: tibdex/github-app-token@v1 + id: generate-token with: - branch: ${{ github.event.pull_request.base.ref }} - commit_message: "Update CHANGELOG.md for PR #${{ github.event.pull_request.number }}" - file_pattern: CHANGELOG.md + app_id: ${{ secrets.LE_BOT_APP_ID }} + private_key: ${{ secrets.LE_BOT_PRIVATE_KEY }} + - name: Commit updated CHANGELOG.md + env: + GH_APP_TOKEN: ${{ steps.generate-token.outputs.token }} + run: | + git add CHANGELOG.md + git commit -m "Update CHANGELOG.md for PR #${{ github.event.pull_request.number }}" + git push origin ${{ github.event.pull_request.head.ref }}