Skip to content

Commit ac6a88a

Browse files
authored
👷 Use GitHub CLI for Git authentication (#656)
1 parent 128b0ad commit ac6a88a

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
@@ -71,11 +71,11 @@ jobs:
7171
- name: Commit and push changes
7272
if: env.CAN_PUSH == 'true' && steps.changes.outputs.changed == 'true'
7373
env:
74-
PR_PUSH_TOKEN: ${{ steps.pr-push.outputs.token }}
74+
GH_TOKEN: ${{ steps.pr-push.outputs.token }}
7575
run: |
7676
git config user.name "pr-push[bot]"
7777
git config user.email "pr-push[bot]@users.noreply.github.com"
78-
git remote set-url origin "https://x-access-token:${PR_PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
78+
gh auth setup-git
7979
git add -A
8080
if git diff --staged --quiet; then
8181
echo "No changes to commit"

0 commit comments

Comments
 (0)