Avoid duplicate source job for Toolkit main PRs
This commit is contained in:
@@ -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 }}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user