Skip to content

Commit f61028f

Browse files
committed
👷 Use GitHub CLI for Git authentication
1 parent 27e6750 commit f61028f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ jobs:
7272
- name: Commit and push changes
7373
if: env.CAN_PUSH == 'true' && steps.changes.outputs.changed == 'true'
7474
env:
75-
PR_PUSH_TOKEN: ${{ steps.pr-push.outputs.token }}
75+
GH_TOKEN: ${{ steps.pr-push.outputs.token }}
7676
run: |
7777
git config user.name "pr-push[bot]"
7878
git config user.email "pr-push[bot]@users.noreply.github.com"
79-
git remote set-url origin "https://x-access-token:${PR_PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
79+
gh auth setup-git
8080
git add -A
8181
if git diff --staged --quiet; then
8282
echo "No changes to commit"

0 commit comments

Comments
 (0)