Skip to content

Commit

Permalink
Merge pull request #10 from learningequality/rtibbles-patch-1
Browse files Browse the repository at this point in the history
Update update_changelog.yml
  • Loading branch information
rtibbles authored Aug 8, 2024
2 parents 53d9bb0 + e123ba2 commit 8db3117
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/update_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -44,10 +45,16 @@ jobs:
done <<< "$changelog_section" > pr_info.txt
awk '/<!-- \[DO NOT REMOVE-USED BY GH ACTION\] PASTE CHANGELOG -->/{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 }}

0 comments on commit 8db3117

Please sign in to comment.