diff --git a/.github/workflows/preview-fork-deploy.yml b/.github/workflows/preview-fork-deploy.yml index 6c595b67..1412b471 100644 --- a/.github/workflows/preview-fork-deploy.yml +++ b/.github/workflows/preview-fork-deploy.yml @@ -20,7 +20,8 @@ jobs: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.pull_requests[0].number > 0 && - github.event.workflow_run.head_repository.id != github.event.repository.id + (github.event.workflow_run.head_repository.id != github.event.repository.id || + startsWith(github.event.workflow_run.head_branch, 'dependabot/')) runs-on: ubuntu-latest timeout-minutes: 15 concurrency: @@ -46,7 +47,7 @@ jobs: - name: Create scoped Pages deployment token id: preview-token - uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2 + uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 with: app-id: ${{ vars.LIBRECODE_WORKFLOW_APP_ID }} private-key: ${{ secrets.LIBRECODE_WORKFLOW_APP_PRIVATE_KEY }} diff --git a/.github/workflows/preview-remove.yml b/.github/workflows/preview-remove.yml index 4b8ffad9..e22a6027 100644 --- a/.github/workflows/preview-remove.yml +++ b/.github/workflows/preview-remove.yml @@ -33,7 +33,7 @@ jobs: - name: Create scoped cleanup token id: preview-token - uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2 + uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 with: app-id: ${{ vars.LIBRECODE_WORKFLOW_APP_ID }} private-key: ${{ secrets.LIBRECODE_WORKFLOW_APP_PRIVATE_KEY }} diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index c4b0fcc8..cd9eaacc 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -58,7 +58,7 @@ jobs: --site _publish --preview-root "$PREVIEW_ROOT" - name: Upload unprivileged preview for fork PRs - if: github.event.pull_request.head.repo.full_name != github.repository + if: github.event.pull_request.head.repo.full_name != github.repository || github.event.pull_request.user.login == 'dependabot[bot]' uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 with: name: documentation-preview-site @@ -68,9 +68,9 @@ jobs: retention-days: 3 - name: Create scoped preview deployment token - if: github.event.pull_request.head.repo.full_name == github.repository + if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login != 'dependabot[bot]' id: preview-token - uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2 + uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 with: app-id: ${{ vars.LIBRECODE_WORKFLOW_APP_ID }} private-key: ${{ secrets.LIBRECODE_WORKFLOW_APP_PRIVATE_KEY }} @@ -80,7 +80,7 @@ jobs: - name: Deploy preview to separate GitHub Pages origin id: preview-deploy - if: github.event.pull_request.head.repo.full_name == github.repository + if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login != 'dependabot[bot]' uses: LibreSign/pr-preview-action@2a6da1177b47dc23173ba9a75e01da0a0d800978 with: action: deploy @@ -98,7 +98,7 @@ jobs: token: ${{ steps.preview-token.outputs.token }} - name: Wait until GitHub Pages serves this exact preview revision - if: github.event.pull_request.head.repo.full_name == github.repository + if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login != 'dependabot[bot]' env: PREVIEW_ROOT: https://libresign.github.io/site-preview/docs-preview/pr-${{ github.event.pull_request.number }} run: | @@ -121,7 +121,7 @@ jobs: done - name: Check every navigable preview route on the public origin - if: github.event.pull_request.head.repo.full_name == github.repository + if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login != 'dependabot[bot]' env: PREVIEW_ROOT: https://libresign.github.io/site-preview/docs-preview/pr-${{ github.event.pull_request.number }} run: | @@ -163,7 +163,7 @@ jobs: done - name: Comment with navigable preview links - if: github.event.pull_request.head.repo.full_name == github.repository + if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login != 'dependabot[bot]' env: GH_TOKEN: ${{ github.token }} PR_NUMBER: ${{ github.event.pull_request.number }}