Skip to content

Commit b3be847

Browse files
authored
docs(README): Create a git committer string for an app installation (#142)
closes #137
1 parent c8f55ef commit b3be847

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,26 @@ jobs:
6161
github_token: ${{ steps.app-token.outputs.token }}
6262
```
6363

64+
### Create a git committer string for an app installation
65+
66+
```yaml
67+
on: [pull_request]
68+
69+
jobs:
70+
auto-format:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/create-github-app-token@v1
74+
id: app-token
75+
with:
76+
# required
77+
app-id: ${{ vars.APP_ID }}
78+
private-key: ${{ secrets.PRIVATE_KEY }}
79+
- id: committer
80+
run: echo "string=${{steps.app-auth.outputs.app-slug}}[bot] <${{ steps.app-auth.outputs.installation-id }}+${{ steps.app-auth.outputs.app-slug }}[bot]@users.noreply.github.com>" >> "$GITHUB_OUTPUT"
81+
- run: echo "committer string is ${{steps.committer.outputs.string}}"
82+
```
83+
6484
### Create a token for all repositories in the current owner's installation
6585

6686
```yaml

0 commit comments

Comments
 (0)