Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Thu, 21 May 2026 08:47:11 +0000 Subject: [pgjdbc/pgjdbc] PR #4085: ci: opt-in scheduled workflows via ENABLE_SCHEDULED_JOBS repo variable List-Id: X-GitHub-Author-Id: 213894 X-GitHub-Author-Login: vlsi X-GitHub-Issue: 4085 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: merged X-GitHub-Type: pull_request X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/4085 Content-Type: text/plain; charset=utf-8 ## Summary - Forks inherit the `schedule:` triggers from `codeql.yml`, `omni.yml`, and `ossf-scorecard.yaml`. They burn CI minutes and produce failure notifications even though fork owners typically do not want the recurring runs. - Gate scheduled events on a repository variable `ENABLE_SCHEDULED_JOBS`. Cron-triggered jobs only run when the variable is set to `true`. Other triggers (`push`, `pull_request`, `workflow_dispatch`, `branch_protection_rule`) are unchanged. - To keep the cron schedule active in this repo, a maintainer needs to set `ENABLE_SCHEDULED_JOBS=true` under **Settings → Secrets and variables → Actions → Variables**. ## Implementation The condition used on the relevant jobs: ```yaml if: github.event_name != 'schedule' || vars.ENABLE_SCHEDULED_JOBS == 'true' ``` - `codeql.yml` — added to job `analyze`. - `omni.yml` — added to `matrix_prep` (job `test` skips automatically via `needs:`) and to `test-pg-head`. - `ossf-scorecard.yaml` — combined with the existing default-branch guard via `&&`. ## Test plan - [x] Set `ENABLE_SCHEDULED_JOBS=true` in repo variables and verify the next nightly Omni run and weekly CodeQL/Scorecard runs fire. - [x] Confirm a `push`/`pull_request` to `master` still triggers `codeql` and `ossf-scorecard`. - [ ] Confirm `workflow_dispatch` of `omni` still works regardless of the variable. - [ ] Verify a fork without the variable no longer runs the cron jobs. 🤖 Generated with [Claude Code](https://claude.com/claude-code)