👷 Use GitHub CLI for Git authentication (#2410)

This commit is contained in:
Sebastián Ramírez
2026-08-09 00:28:17 +02:00
committed by GitHub
parent 220bcb74aa
commit 6a1c084f6e
+2 -2
View File
@@ -78,11 +78,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"