diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f4faae8..5ea5f3d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,11 @@ on: jobs: release: + # Do not run this job for pull requests where both branches are from the same repo. + # Jobs that depend on this one will be skipped too. + # This prevents duplicate CI runs for our own pull requests, whilst preserving the ability to + # run the CI for each branch push to a fork, and for each pull request originating from a fork. + if: github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id permissions: contents: write runs-on: ubuntu-latest