From 44af4b8109c10c75f8f6686f6ba0fbc4f398941b Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Fri, 7 Jun 2024 10:12:13 -0700 Subject: [PATCH] docs(README): Create a git committer string for an app installation closes #137 --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 008ec326..cb881408 100644 --- a/README.md +++ b/README.md @@ -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