Skip to content

Commit 8cf8822

Browse files
committed
setup user
1 parent 4467807 commit 8cf8822

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/create_release_branch.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
3737
persist-credentials: false
3838

39-
- name: Checkout repository (${{ github.event.inputs.commit_sha }})
39+
- name: Checkout repository (commit SHA))
4040
if: ${{ github.event.inputs.commit_sha != '' }}
4141
uses: actions/checkout@v4
4242
with:
@@ -46,6 +46,18 @@ jobs:
4646
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
4747
persist-credentials: false
4848

49+
- name: Get GitHub App User ID
50+
id: get-user-id
51+
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
52+
env:
53+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
54+
55+
- name: Set up Git
56+
id: setup-git
57+
run: |
58+
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
59+
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
60+
4961
- name: Check if release branch already exists
5062
id: check-branch
5163
run: |

0 commit comments

Comments
 (0)