diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fdc501032f..8a2b6272167 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -236,7 +236,7 @@ jobs: 'project-lint-jobs', 'project-test-jobs', ] - if: ${{ !cancelled() && github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork }} + if: ${{ !cancelled() && github.event_name != 'pull_request' && github.repository == 'woocommerce/woocommerce' }} steps: - uses: 'actions/checkout@v4' name: 'Checkout' @@ -273,7 +273,7 @@ jobs: 'project-jobs', 'project-test-jobs', ] - if: ${{ !cancelled() && needs.project-jobs.outputs.report-jobs != '[]' && ! github.event.pull_request.head.repo.fork }} + if: ${{ !cancelled() && needs.project-jobs.outputs.report-jobs != '[]' && github.repository == 'woocommerce/woocommerce' }} strategy: fail-fast: false matrix: @@ -330,7 +330,7 @@ jobs: report-flaky-tests: name: 'Create issues for flaky tests' - if: ${{ !cancelled() && ! github.event.pull_request.head.repo.fork && needs.project-jobs.outputs.test-jobs != '[]' }} + if: ${{ !cancelled() && github.repository == 'woocommerce/woocommerce' && needs.project-jobs.outputs.test-jobs != '[]' }} needs: [ 'project-jobs', diff --git a/.github/workflows/tests-daily-run.yml b/.github/workflows/tests-daily-run.yml index 581ec84543e..ccea88a5620 100644 --- a/.github/workflows/tests-daily-run.yml +++ b/.github/workflows/tests-daily-run.yml @@ -7,6 +7,7 @@ on: jobs: run-tests: name: 'Run tests' + if: github.repository == 'woocommerce/woocommerce' uses: ./.github/workflows/ci.yml with: trigger: 'daily-checks'