GeezerVison is showing github.com — ci · dotneB/opencode@3fef490
File tree
Expand file treeCollapse file tree
Open diff view settings
.github/actions/setup-git-committer
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/actions/setup-git-committer/action.yml +6-16Lines changed: 6 additions & 16 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,33 +10,23 @@ inputs: |
10 | 10 | outputs: |
11 | 11 | token: |
12 | 12 | description: "GitHub App token" |
13 | | - value: ${{ steps.app-token.outputs.token }} |
| 13 | + value: ${{ steps.apptoken.outputs.token }} |
14 | 14 | app-slug: |
15 | 15 | description: "GitHub App slug" |
16 | | - value: ${{ steps.app-token.outputs.app-slug }} |
17 | | - user-id: |
18 | | - description: "GitHub App user id" |
19 | | - value: ${{ steps.get-user-id.outputs.user-id }} |
| 16 | + value: ${{ steps.apptoken.outputs.app-slug }} |
20 | 17 | runs: |
21 | 18 | using: "composite" |
22 | 19 | steps: |
23 | 20 | - name: Create app token |
24 | | - id: app-token |
| 21 | + id: apptoken |
25 | 22 | uses: actions/create-github-app-token@v2 |
26 | 23 | with: |
27 | 24 | app-id: ${{ inputs.opencode-app-id }} |
28 | 25 | private-key: ${{ inputs.opencode-app-secret }} |
29 | 26 |
|
30 | | - - name: Get GitHub App user id |
31 | | - id: get-user-id |
32 | | - run: | |
33 | | - echo "user-id=$(gh api \"/users/${{ steps.app-token.outputs.app-slug }}%5Bbot%5D\" --jq .id)" >> "$GITHUB_OUTPUT" |
34 | | - shell: bash |
35 | | - env: |
36 | | - GH_TOKEN: ${{ steps.app-token.outputs.token }} |
37 | | - |
38 | 27 | - name: Configure git user |
39 | 28 | run: | |
40 | | - git config --global user.name "${{ steps.app-token.outputs.app-slug }}[bot]" |
41 | | - git config --global user.email "${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com" |
| 29 | + slug="${{ steps.apptoken.outputs.app-slug }}" |
| 30 | + git config --global user.name "${slug}[bot]" |
| 31 | + git config --global user.email "${slug}[bot]@users.noreply.github.com" |
42 | 32 | shell: bash |