Skip to content

Commit 13d7110

Browse files
authored
Use app token for bio update too
Apps can update user profile as well. Also remove the github-actions author from gh-pages commit
1 parent 48682b9 commit 13d7110

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/push.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
add_options: --force
3636
file_pattern: chris-buckley-cv.pdf index.md
3737
skip_dirty_check: true
38-
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
3938
commit_message: Updated GitHub Pages
4039
branch: gh-pages
4140
push_options: --force
@@ -71,17 +70,17 @@ jobs:
7170
needs: check_role
7271
if: ${{ github.event_name == 'push' && fromJSON(needs.check_role.outputs.changed) }}
7372
steps:
74-
- name: Update GitHub bio
75-
env:
76-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
77-
run: gh api -X PATCH user -F "bio=${{ format('{0} at {1}', needs.check_role.outputs.role, needs.check_role.outputs.company) }}"
7873
- name: Generate a token
7974
id: token
8075
uses: actions/create-github-app-token@v2
8176
with:
8277
app-id: ${{ vars.BUXBOT_APP_ID }}
8378
private-key: ${{ secrets.BUXBOT_PRIVATE_KEY }}
8479
repositories: ${{ github.repository_owner }}/${{ github.repository_owner }}.github.io
80+
- name: Update GitHub bio
81+
env:
82+
GH_TOKEN: ${{ steps.token.outputs.token }}
83+
run: gh api -X PATCH user -F "bio=${{ format('{0} at {1}', needs.check_role.outputs.role, needs.check_role.outputs.company) }}"
8584
- name: Checkout main site repo
8685
uses: actions/checkout@v5
8786
with:

0 commit comments

Comments
 (0)