From 41142e707a436904d55febbd9093ec55a59f12de Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 18 Oct 2026 22:35:04 -0600 Subject: [PATCH] Avoid duplicate source job for Toolkit main PRs --- .gitea/workflows/source.yml | 3 +-- ci/check-runner-image.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/source.yml b/.gitea/workflows/source.yml index 42b8cf07..e934fbe6 100644 --- a/.gitea/workflows/source.yml +++ b/.gitea/workflows/source.yml @@ -3,8 +3,7 @@ name: source on: pull_request: branches: [next] - push: - branches-ignore: [main, next] + workflow_dispatch: concurrency: group: alkane-toolkit-source-${{ github.ref }} diff --git a/ci/check-runner-image.py b/ci/check-runner-image.py index af1e9090..94995e91 100644 --- a/ci/check-runner-image.py +++ b/ci/check-runner-image.py @@ -43,6 +43,16 @@ def main() -> int: for step in release["jobs"]["release"]["steps"]): print("Main release must not publish Pages from GARM", file=sys.stderr) return 1 + source = yaml.load( + (ROOT / ".gitea/workflows/source.yml").read_text(), + Loader=yaml.BaseLoader, + ) + triggers = source["on"] + if (triggers.get("pull_request", {}).get("branches") != ["next"] + or "push" in triggers or "workflow_dispatch" not in triggers): + print("Source checks must not duplicate main pull request verification", + file=sys.stderr) + return 1 print("Toolkit runner image pins: PASS") return 0