File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Setup app bot
2
+ description : Gets a github app token and configures git with the app's user
3
+ inputs :
4
+ app-id :
5
+ description : The app id
6
+ required : true
7
+ private-key :
8
+ description : The app private key
9
+ required : true
10
+ outputs :
11
+ token :
12
+ description : The token to use for the GitHub App
13
+ value : ${{ steps.app-token.outputs.token }}
14
+ runs :
15
+ using : " composite"
16
+ steps :
17
+ - uses : actions/create-github-app-token@v1
18
+ id : app-token
19
+ with :
20
+ app-id : ${{ inputs.app-id }}
21
+ private-key : ${{ inputs.private-key }}
22
+
23
+ - name : Get GitHub App User ID
24
+ id : get-user-id
25
+ run : echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
26
+ shell : bash
27
+ env :
28
+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
29
+
30
+ - name : Set up Git
31
+ run : |
32
+ git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
33
+ git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
34
+ shell : bash
You can’t perform that action at this time.
0 commit comments