Skip to content

Commit

Permalink
ci: don't retry or notify on failures from forks (vercel#59118)
Browse files Browse the repository at this point in the history
### Why?

For some reason the retry action can be triggered if there's a PR from
the canary branch of a fork.
https://github.com/vercel/next.js/actions/runs/7040561852/attempts/3



Closes PACK-2062
  • Loading branch information
ForsakenHarmony authored Nov 30, 2023
1 parent d605ef6 commit 956636c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/retry_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:
jobs:
retry-on-failure:
name: retry failed jobs
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt < 3 }}
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt < 3 && github.repository == 'vercel/next.js' }}
runs-on: ubuntu-latest
steps:
- name: send retry request to GitHub API
Expand All @@ -31,7 +31,7 @@ jobs:
report-failure:
name: report failure to slack
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt >= 3 }}
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt >= 3 && github.repository == 'vercel/next.js' }}
runs-on: ubuntu-latest
steps:
- name: send webhook
Expand Down

0 comments on commit 956636c

Please sign in to comment.