Avoid duplicate source job for Toolkit main PRs

This commit is contained in:
2026-10-18 22:35:04 -06:00
parent 7f106e2deb
commit 41142e707a
2 changed files with 11 additions and 2 deletions
+1 -2
View File
@@ -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 }}
+10
View File
@@ -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