Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/blog-auto-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ jobs:
contents: write

steps:
- name: Generate bot token
id: bot-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GITHUB_BOT_APP_ID }}
private-key: ${{ secrets.GITHUB_BOT_PRIVATE_KEY }}

- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ steps.bot-token.outputs.token }}

- name: Get changed MDX files
id: changed-files
Expand All @@ -40,8 +47,8 @@ jobs:
- name: Commit and push formatting changes
if: steps.changed-files.outputs.has_files == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "hyper-charlie[bot]"
git config user.email "hyper-charlie[bot]@users.noreply.github.com"
git add -A
if git diff --staged --quiet; then
echo "No formatting changes needed"
Expand Down