]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commitdiff
👷 Use GitHub CLI for Git authentication (#2070)
authorSebastián Ramírez <tiangolo@gmail.com>
Sat, 8 Aug 2026 22:28:21 +0000 (00:28 +0200)
committerGitHub <noreply@github.com>
Sat, 8 Aug 2026 22:28:21 +0000 (00:28 +0200)
.github/workflows/pre-commit.yml

index 68cdd9c5e44b89bef2810cb2a321c4de1dce927b..e1ecd76e3f562c9603f6f104750b1be431ce23f3 100644 (file)
@@ -72,11 +72,11 @@ jobs:
       - name: Commit and push changes
         if: env.CAN_PUSH == 'true' && steps.changes.outputs.changed == 'true'
         env:
-          PR_PUSH_TOKEN: ${{ steps.pr-push.outputs.token }}
+          GH_TOKEN: ${{ steps.pr-push.outputs.token }}
         run: |
           git config user.name "pr-push[bot]"
           git config user.email "pr-push[bot]@users.noreply.github.com"
-          git remote set-url origin "https://x-access-token:${PR_PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
+          gh auth setup-git
           git add -A
           if git diff --staged --quiet; then
             echo "No changes to commit"