Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions opa/opa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ func TestJobUsesSelfHostedRunner(t *testing.T) {
cases := map[string]bool{
"ubuntu-latest": false,
"ubuntu-22.04": false,
"ubuntu-22.04-arm": false,
"ubuntu-24.04-arm": false,
"ubuntu-26.04-arm": false,
"ubuntu-20.04": false,
"ubuntu-slim": false,
"macos-latest-large": false,
Expand All @@ -131,6 +134,8 @@ func TestJobUsesSelfHostedRunner(t *testing.T) {
"windows-latest": false,
"windows-2022": false,
"windows-2019": false,
"windows-11-arm": false,
"windows-11-vs2026-arm": false,
"self-hosted": true,
"random-name": true,
}
Expand Down
2 changes: 1 addition & 1 deletion opa/rego/poutine/utils.rego
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ job_uses_self_hosted_runner(job) if {
run_on := job.runs_on[_]
not contains(run_on, "$") # skip expressions
not regex.match(
"(?i)^((ubuntu-(([0-9]{2})\\.04|latest(-(4|8|16)-cores)?|slim)|macos-([0-9]{2}|latest)(-x?large)?|windows-(20[0-9]{2}|latest(-8-cores)?)|(buildjet|warp)-[a-z0-9-]+))$",
"(?i)^((ubuntu-(([0-9]{2})\\.04(-arm)?|latest(-(4|8|16)-cores)?|slim)|macos-([0-9]{2}|latest)(-x?large)?|windows-(20[0-9]{2}|latest(-8-cores)?|11(-vs[0-9]{4})?-arm)|(buildjet|warp)-[a-z0-9-]+))$",
run_on,
)
} else := false
Expand Down
Loading