diff --git a/.github/workflows/format-pr.yml b/.github/workflows/format-pr.yml index 20beba0bf0..f9e9b49419 100644 --- a/.github/workflows/format-pr.yml +++ b/.github/workflows/format-pr.yml @@ -19,6 +19,8 @@ jobs: with: # Credentials needed for pushing changes at the end. # This is already the default, but for safety we are being explicit about this. + # Commits made by workflow_dispatch trigger will trigger new workflows to run, + # so don't need to use SSH deploy key. persist-credentials: true - name: Install Node.js uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af @@ -91,8 +93,11 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: repository: TurboWarp/extensions - # Credentials needed at the end to do the push. - persist-credentials: true + # Commits made using the default token in an issue_comment trigger won't cause more + # workflows to run, so any commits it pushes will be stuck in limbo forever waiting + # for workflows to run that will never run. To workaround this, we use an SSH key + # instead. It's a GitHub deploy key so it's scoped only to this repository. + ssh-key: ${{ secrets.FORMAT_PR_DEPLOY_KEY }} - name: Checkout pull request run: gh pr checkout "$PR_NUM" env: