ci.gatekeeper: Alias linked ci-devel results

Jobs in a manually triggered run inherit the ci-devel workflow name.

They therefore cannot satisfy required names belonging to regular CI or self-hosted static checks.

Match jobs from the validated run under those two workflow names and reuse the current required-job filtering and status handling.

Generated-By: GitHub Copilot
Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
This commit is contained in:
Aurélien Bombo
2026-07-24 15:36:03 -05:00
parent 5aeae8ebe0
commit 52925d2966

View File

@@ -47,6 +47,10 @@ _CI_DEVEL_OVERLAPPING_WORKFLOWS = {
".github/workflows/ci-on-push.yaml",
".github/workflows/static-checks-self-hosted.yaml",
}
_CI_DEVEL_WORKFLOW_ALIASES = (
"Kata Containers CI",
"Static checks self-hosted",
)
_GH_SUMMARY_URL = (
f"{os.environ.get('GITHUB_SERVER_URL')}/"
f"{os.environ.get('GITHUB_REPOSITORY')}/actions/runs/"
@@ -286,6 +290,13 @@ class Checker:
return (self.ci_devel_run is not None and
run.get("path") in _CI_DEVEL_OVERLAPPING_WORKFLOWS)
def workflow_names(self, run):
"""Get workflow names used to match a run's jobs"""
if (self.ci_devel_run is not None and
run["id"] == self.ci_devel_run["id"]):
return _CI_DEVEL_WORKFLOW_ALIASES
return (run["name"],)
def check_workflow_runs_status(self, attempt, workflow_runs=None):
"""
Checks if all required jobs passed
@@ -301,7 +312,8 @@ class Checker:
continue
jobs = self.get_jobs_for_workflow_run(run["id"])
for job in jobs:
self.record(run["name"], job)
for workflow in self.workflow_names(run):
self.record(workflow, job)
print(self)
self.write_step_summary()
return self.status()