Skip to content

Commit

Permalink
docs(README): Create a git committer string for an app installation (#…
Browse files Browse the repository at this point in the history
…142)

closes #137
  • Loading branch information
gr2m authored Jun 11, 2024
1 parent c8f55ef commit b3be847
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,26 @@ jobs:
github_token: ${{ steps.app-token.outputs.token }}
```

### Create a git committer string for an app installation

```yaml
on: [pull_request]
jobs:
auto-format:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
# required
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- id: committer
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"
- run: echo "committer string is ${{steps.committer.outputs.string}}"
```

### Create a token for all repositories in the current owner's installation

```yaml
Expand Down

0 comments on commit b3be847

Please sign in to comment.