Skip to content

Commit 4779f42

Browse files
committed
fix(github-app-auth): set local git config after checkout step
Move local git config (user.name, user.email) to a dedicated step that runs after checkout, so it always sets both global and local config when a repo is present. When skip-checkout is true, only global config is set. https://claude.ai/code/session_01To6bMgr59sMZgHKDTt4F1x
1 parent 7aae511 commit 4779f42

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/actions/github-app-auth/action.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ runs:
8181
echo "Wrote GITHUB_TOKEN to GITHUB_ENV"
8282
git config --global user.name '${{ steps.get-user-id.outputs.user-name }}'
8383
git config --global user.email '${{ steps.get-user-id.outputs.user-email }}'
84-
if [ "${{ inputs.skip-checkout }}" != "true" ]; then
85-
git config user.name '${{ steps.get-user-id.outputs.user-name }}'
86-
git config user.email '${{ steps.get-user-id.outputs.user-email }}'
87-
fi
8884
8985
- name: Output GitHub App authentication info
9086
shell: bash
@@ -103,3 +99,10 @@ runs:
10399
token: ${{ steps.app-token.outputs.token }}
104100
clean: false
105101
persist-credentials: true
102+
103+
- name: Configure local git user
104+
if: inputs.skip-checkout != 'true'
105+
shell: bash
106+
run: |
107+
git config user.name '${{ steps.get-user-id.outputs.user-name }}'
108+
git config user.email '${{ steps.get-user-id.outputs.user-email }}'

0 commit comments

Comments
 (0)