diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 1c4f5dfc..1cdc02f7 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -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"