diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 60e3329623..6951a8ad38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,6 +23,8 @@ env: jobs: test: + # Run scheduled jobs only on the main repository (disable cron on forks) + if: ${{ github.repository_owner == 'fastapi' || github.event_name != 'schedule' }} strategy: matrix: os: [ ubuntu-latest, windows-latest, macos-latest ] @@ -135,7 +137,7 @@ jobs: # https://github.com/marketplace/actions/alls-green#why alls-green: # This job does nothing and is only used for the branch protection - if: always() + if: always() && (github.repository_owner == 'fastapi' || github.event_name != 'schedule') needs: - coverage-combine runs-on: ubuntu-latest