Skip to content

Commit 7f31026

Browse files
nirinchevgagik
andauthored
chore: add app email to setup-github-app action (#499)
Co-authored-by: Gagik Amaryan <[email protected]>
1 parent 0bce1e5 commit 7f31026

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

actions/setup-bot-token/action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ outputs:
1414
app-slug:
1515
description: GitHub App slug
1616
value: ${{ steps.app-token.outputs.app-slug }}
17+
app-email:
18+
description: The generated email for the GitHub App
19+
value: ${{ steps.get-user-email.outputs.user-email }}
1720
runs:
1821
using: "composite"
1922
steps:
@@ -30,8 +33,13 @@ runs:
3033
env:
3134
GH_TOKEN: ${{ steps.app-token.outputs.token }}
3235

36+
- name: Get GitHub App User email
37+
id: get-user-email
38+
run: echo "user-email=${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com" >> "$GITHUB_OUTPUT"
39+
shell: bash
40+
3341
- name: Set up Git
3442
run: |
3543
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
36-
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
44+
git config --global user.email '${{ steps.get-user-email.outputs.user-email }}'
3745
shell: bash

0 commit comments

Comments
 (0)