Skip to content

Commit a29c829

Browse files
authored
Merge pull request #47 from Power2All/Power2All-patch-1
Update weekly.yml
2 parents f14ae67 + f61f4bd commit a29c829

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/weekly.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jobs:
2020
with:
2121
app-id: ${{ vars.APP_ID }}
2222
private-key: ${{ secrets.PRIVATE_APP_KEY }}
23+
24+
- name: Get GitHub App User ID
25+
id: get-user-id
26+
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
27+
env:
28+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
2329

2430
- name: Checkout code
2531
uses: actions/checkout@v4
@@ -42,8 +48,8 @@ jobs:
4248
- name: Push changes
4349
continue-on-error: true
4450
run: |
45-
git config user.name ${{ secrets.GH_USER }}
46-
git config user.email "${{ secrets.GH_MAIL }}"
51+
git config user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
52+
git config user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
4753
git add Cargo.lock
4854
git commit -m "Weekly Cargo.lock update"
4955
git push --force

0 commit comments

Comments
 (0)