Skip to content

Commit 9562cca

Browse files
committed
Configure git user
1 parent a440db3 commit 9562cca

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/test-sign.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
runs-on: ubuntu-latest
99
environment: Automation
1010

11+
permissions: {}
12+
1113
steps:
1214
- name: Dump environment
1315
run: env
@@ -24,7 +26,19 @@ jobs:
2426
app-id: ${{ vars.AUTOMATION_APP_ID }}
2527
private-key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
2628

27-
- uses: actions/checkout@v5
29+
- name: Get GitHub App User ID
30+
id: get-user-id
31+
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
32+
env:
33+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
34+
35+
- name: Configure git user
36+
run: |
37+
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
38+
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
39+
40+
- name: Checkout repository
41+
uses: actions/checkout@v5
2842
with:
2943
token: ${{ steps.app-token.outputs.token }}
3044
fetch-depth: 0 # ensure we have all tags and can push commits

0 commit comments

Comments
 (0)