Skip to content

Commit eea3041

Browse files
authored
Merge pull request #67 from joonas/chore/use-wasmcloud-automation-app-for-commits
chore: Use wasmcloud-automation-app for 'go mod tidy' commits
2 parents 35eb9cc + cb2147b commit eea3041

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/dependabot-pr-go-mod-tidy.yaml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,27 @@ jobs:
4141
files: |
4242
**/go.mod
4343
**/go.sum
44+
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
45+
if: ${{ steps.verify_changed_files.outputs.files_changed == 'true' }}
46+
id: app-token
47+
with:
48+
app-id: ${{ secrets.BOT_APP_ID }}
49+
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
50+
- name: Get GitHub App User ID
51+
if: ${{ steps.verify_changed_files.outputs.files_changed == 'true' }}
52+
id: get-user-id
53+
env:
54+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
55+
run: |
56+
echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
57+
- name: Configure GitHub App as committer
58+
if: ${{ steps.verify_changed_files.outputs.files_changed == 'true' }}
59+
run: |
60+
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
61+
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
4462
- name: Push changes
4563
if: ${{ steps.verify_changed_files.outputs.files_changed == 'true' }}
4664
run: |
47-
git config user.name "github-actions[bot]"
48-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
49-
git add $(git ls-files -m)
65+
git add .
5066
git commit -m "chore: go mod tidy" --signoff
5167
git push

0 commit comments

Comments
 (0)