Skip to content

Commit 522c65e

Browse files
committed
try github get_user
1 parent 481ee81 commit 522c65e

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ jobs:
4848
cd cli/temporalcli/internal/cmd/gen-docs
4949
go run .
5050
51+
- name: Get user info from GitHub API
52+
id: get_user
53+
run: |
54+
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
55+
https://api.github.com/users/${{ github.actor }} > user.json
56+
57+
name=$(jq -r .name user.json)
58+
email="${{ github.actor }}@users.noreply.github.com" # fallback
59+
60+
echo "git_name=$name" >> $GITHUB_OUTPUT
61+
echo "git_email=$email" >> $GITHUB_OUTPUT
62+
5163
- name: Publish generated docs to documentation repo
5264
env:
5365
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
@@ -69,8 +81,13 @@ jobs:
6981
cd docs
7082
7183
# Setup the committers identity.
72-
git config --global user.email "sdk@temporal.io"
73-
git config --global user.name "Temporal CLI"
84+
#git config --global user.email "sdk@temporal.io"
85+
#git config --global user.name "Temporal CLI"
86+
87+
echo "${{ steps.get_user.outputs.git_name }}"
88+
echo "${{ steps.get_user.outputs.git_email }}"
89+
git config user.name "${{ steps.get_user.outputs.git_name }}"
90+
git config user.email "${{ steps.get_user.outputs.git_email }}"
7491
7592
git checkout -b $BRANCH_NAME
7693
cp ../cli/temporalcli/docs/*.mdx docs/cli/

0 commit comments

Comments
 (0)