Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
merge_group:
types: [checks_requested]
push:
branches: [main, "release/**"]
branches: [main, RC, "release/**"]

concurrency:
group: ci-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: CodeQL

on:
push:
branches: [main, "release/**"]
branches: [main, RC, "release/**"]
pull_request:
branches: [main, RC, "release/**"]
merge_group:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
merge_group:
types: [checks_requested]
push:
branches: [main, "release/**"]
branches: [main, RC, "release/**"]

permissions:
contents: read
Expand Down
21 changes: 21 additions & 0 deletions scripts/rc-workflows.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-FileCopyrightText: 2026 VishnuM049
// SPDX-License-Identifier: Apache-2.0

import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";

for (const workflow of ["ci.yml", "codeql.yml", "gitleaks.yml"]) {
test(`${workflow} checks every RC push`, () => {
const source = readFileSync(
new URL(`../.github/workflows/${workflow}`, import.meta.url),
"utf8",
);
const branches = source.match(/^ {2}push:\r?\n {4}branches: \[([^\]]+)\]/m)?.[1];
assert.ok(branches, `${workflow} must declare push branches`);
assert.ok(
branches.split(",").some((branch) => branch.trim().replace(/^['"]|['"]$/g, "") === "RC"),
`${workflow} must run on RC pushes`,
);
});
}
Loading