This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch guard-fork-scheduled-workflows in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 00c77ca68204c956760a9274baac21831197a833 Author: Jarek Potiuk <[email protected]> AuthorDate: Sun Nov 1 19:49:30 2026 +0100 Skip scheduled workflows in forks that enable Actions Contributors enable Actions on their forks for fork CI (AIP-120), and every cron in the repository then fires there as well. Unguarded scheduled workflows ran CodeQL and the maintenance jobs daily in each fork, using the contributor's minutes; GitHub has started disabling Actions on such forks as wasted compute. Generated-by: Claude Opus 5 --- .github/workflows/ci-duration-monitor.yml | 1 + .github/workflows/ci-notification.yml | 1 + .github/workflows/codeql-analysis.yml | 1 + .github/workflows/e2e-flaky-tests-report.yml | 1 + .github/workflows/java-sdk-dependency-security.yml | 1 + .github/workflows/recheck-old-bug-report.yml | 1 + .github/workflows/scheduled-upgrade-check-main.yml | 1 + .github/workflows/scheduled-upgrade-check-v3-4-test.yml | 1 + .github/workflows/scheduled-verify-release-calendar.yml | 1 + .github/workflows/stale.yml | 1 + dev/breeze/doc/ci/08_fork_ci_for_external_contributors.md | 7 +++++++ 11 files changed, 17 insertions(+) diff --git a/.github/workflows/ci-duration-monitor.yml b/.github/workflows/ci-duration-monitor.yml index 5c19ba20e4f..8339bf68385 100644 --- a/.github/workflows/ci-duration-monitor.yml +++ b/.github/workflows/ci-duration-monitor.yml @@ -34,6 +34,7 @@ jobs: monitor-ci-durations: name: "Monitor CI durations on main" + if: github.event_name != 'schedule' || github.repository == 'apache/airflow' runs-on: ubuntu-slim steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" diff --git a/.github/workflows/ci-notification.yml b/.github/workflows/ci-notification.yml index f5743d0d6eb..7d7d6a9a50e 100644 --- a/.github/workflows/ci-notification.yml +++ b/.github/workflows/ci-notification.yml @@ -34,6 +34,7 @@ env: jobs: workflow-status: + if: github.event_name != 'schedule' || github.repository == 'apache/airflow' strategy: matrix: branch: ["v3-4-test"] diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b2e3dc23ab5..a97ac44379f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -49,6 +49,7 @@ concurrency: jobs: detect-languages: name: Detect languages to scan + if: github.event_name != 'schedule' || github.repository == 'apache/airflow' runs-on: ["ubuntu-slim"] permissions: contents: read diff --git a/.github/workflows/e2e-flaky-tests-report.yml b/.github/workflows/e2e-flaky-tests-report.yml index f0fb712a0ea..ad0e3b6f064 100644 --- a/.github/workflows/e2e-flaky-tests-report.yml +++ b/.github/workflows/e2e-flaky-tests-report.yml @@ -33,6 +33,7 @@ jobs: analyze-flaky-tests: name: "Analyze E2E flaky tests" + if: github.event_name != 'schedule' || github.repository == 'apache/airflow' runs-on: ubuntu-slim steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" diff --git a/.github/workflows/java-sdk-dependency-security.yml b/.github/workflows/java-sdk-dependency-security.yml index 0f61ec9c97f..9fc0b7c1061 100644 --- a/.github/workflows/java-sdk-dependency-security.yml +++ b/.github/workflows/java-sdk-dependency-security.yml @@ -37,6 +37,7 @@ concurrency: jobs: dependency-submission: name: Submit resolved Gradle dependencies + if: github.event_name != 'schedule' || github.repository == 'apache/airflow' runs-on: ubuntu-latest permissions: contents: write diff --git a/.github/workflows/recheck-old-bug-report.yml b/.github/workflows/recheck-old-bug-report.yml index 049071dfad0..c860e1cdf7f 100644 --- a/.github/workflows/recheck-old-bug-report.yml +++ b/.github/workflows/recheck-old-bug-report.yml @@ -26,6 +26,7 @@ permissions: issues: write jobs: recheck-old-bug-report: + if: github.repository == 'apache/airflow' runs-on: ["ubuntu-slim"] steps: - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0 diff --git a/.github/workflows/scheduled-upgrade-check-main.yml b/.github/workflows/scheduled-upgrade-check-main.yml index ee0ab72a15a..0464ca4dbb1 100644 --- a/.github/workflows/scheduled-upgrade-check-main.yml +++ b/.github/workflows/scheduled-upgrade-check-main.yml @@ -30,6 +30,7 @@ permissions: jobs: upgrade-main: name: "[main] Upgrade" + if: github.event_name != 'schedule' || github.repository == 'apache/airflow' uses: ./.github/workflows/upgrade-check.yml with: target-branch: main diff --git a/.github/workflows/scheduled-upgrade-check-v3-4-test.yml b/.github/workflows/scheduled-upgrade-check-v3-4-test.yml index 9d51e87cec4..26943d97157 100644 --- a/.github/workflows/scheduled-upgrade-check-v3-4-test.yml +++ b/.github/workflows/scheduled-upgrade-check-v3-4-test.yml @@ -30,6 +30,7 @@ permissions: jobs: upgrade-v3-4-test: name: "[v3-4-test] Upgrade" + if: github.event_name != 'schedule' || github.repository == 'apache/airflow' uses: ./.github/workflows/upgrade-check.yml with: target-branch: v3-4-test diff --git a/.github/workflows/scheduled-verify-release-calendar.yml b/.github/workflows/scheduled-verify-release-calendar.yml index 537d573b2b9..98ecb97431b 100644 --- a/.github/workflows/scheduled-verify-release-calendar.yml +++ b/.github/workflows/scheduled-verify-release-calendar.yml @@ -27,6 +27,7 @@ permissions: jobs: verify-release-calendar: name: "Verify release calendar" + if: github.event_name != 'schedule' || github.repository == 'apache/airflow' runs-on: ["ubuntu-slim"] timeout-minutes: 10 steps: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index aaf17be8b58..0f7a88ef02a 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -27,6 +27,7 @@ permissions: issues: write jobs: stale: + if: github.repository == 'apache/airflow' runs-on: ["ubuntu-slim"] steps: # Handle all PRs (45-day stale) and pending-response issues (14-day stale) diff --git a/dev/breeze/doc/ci/08_fork_ci_for_external_contributors.md b/dev/breeze/doc/ci/08_fork_ci_for_external_contributors.md index aad1a304e74..e4efe527cd3 100644 --- a/dev/breeze/doc/ci/08_fork_ci_for_external_contributors.md +++ b/dev/breeze/doc/ci/08_fork_ci_for_external_contributors.md @@ -164,6 +164,13 @@ cron trigger, and selective checks force the full matrix for `schedule` events. every enabled fork would run the full canary matrix twice a day on the contributor's concurrency cap. A manual `workflow_dispatch` in a fork still runs. +The same applies to every other workflow with a `schedule` trigger: a fork that enables +Actions gets all of their crons too. Their jobs carry a job-level +`if: github.repository == 'apache/airflow'` guard, combined with +`github.event_name != 'schedule'` when the workflow has other triggers that should still run +in a fork. A new scheduled workflow needs the same guard. The guard skips the jobs but not +the run itself, so the frequent crons still leave an empty run in every enabled fork. + | Rule | Decision | Reason | |---|---|---| | Event is `schedule` and repository is not `apache/airflow` | skip | `fork_schedule` |
