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
12 changes: 6 additions & 6 deletions .github/scripts/workflow-pin-metadata.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const test = require("node:test");
const repositoryRoot = path.resolve(__dirname, "..", "..");
const workflowDirectory = path.join(repositoryRoot, ".github", "workflows");
const ciWorkflowsReference = "melodic-software/ci-workflows/";
const ciWorkflowsSha = "b927829fd0f8888b4dbccccdf7b27596ba453940";
const ciWorkflowsVersion = "v0.4.0";
const expectedCiWorkflowsReferences = 18;
const ciWorkflowsSha = "c36e8810832f27a2715af9422af6e191b0c5df66";
const ciWorkflowsVersion = "v0.5.0";
const expectedCiWorkflowsReferences = 20;
const canonicalReference =
/^\s*uses:\s+melodic-software\/ci-workflows\/[^\s@#]+@(?<sha>[0-9a-f]{40})\s+#\s+(?<version>v(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*))\s*$/;

Expand Down Expand Up @@ -101,20 +101,20 @@ test("ci-workflows references use a full SHA with one release version", () => {
assert.equal(
references.length,
expectedCiWorkflowsReferences,
"the 17 existing ci-workflows references plus go-quality must remain inventoried",
"the 18 pre-gate ci-workflows references plus the do-not-merge and pr-issue-linkage gate callers must remain inventoried",
);
assert.equal(
new Set(references).size,
1,
"ci-workflows references must move as one reviewed compatibility pin",
);
assert.equal(references[0], ciWorkflowsSha, "ci-workflows must use the reviewed v0.4.0 SHA");
assert.equal(references[0], ciWorkflowsSha, "ci-workflows must use the reviewed v0.5.0 SHA");
assert.equal(
new Set(versions).size,
1,
"ci-workflows references must name one release version for online pin verification",
);
assert.equal(versions[0], ciWorkflowsVersion, "ci-workflows must identify release v0.4.0");
assert.equal(versions[0], ciWorkflowsVersion, "ci-workflows must identify release v0.5.0");
});

test("go-quality uses the exact reusable caller contract", () => {
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
persist-credentials: false
- name: Lint Markdown
uses: melodic-software/ci-workflows/.github/actions/markdown@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/markdown@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
config: .markdownlint-cli2.jsonc

Expand All @@ -40,7 +40,7 @@ jobs:
with:
persist-credentials: false
- name: Lint shell
uses: melodic-software/ci-workflows/.github/actions/shellcheck@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/shellcheck@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
rcfile: .shellcheckrc

Expand All @@ -54,7 +54,7 @@ jobs:
with:
persist-credentials: false
- name: Check shell formatting
uses: melodic-software/ci-workflows/.github/actions/shfmt@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/shfmt@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0

typos:
name: Spelling
Expand All @@ -66,7 +66,7 @@ jobs:
with:
persist-credentials: false
- name: Check spelling
uses: melodic-software/ci-workflows/.github/actions/typos@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/typos@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
config: _typos.toml

Expand All @@ -80,7 +80,7 @@ jobs:
with:
persist-credentials: false
- name: Check EditorConfig conformance
uses: melodic-software/ci-workflows/.github/actions/editorconfig@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/editorconfig@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
config: .editorconfig-checker.json

Expand All @@ -95,7 +95,7 @@ jobs:
fetch-depth: 0
persist-credentials: false
- name: Scan for secrets
uses: melodic-software/ci-workflows/.github/actions/gitleaks@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/gitleaks@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
config: .gitleaks.toml

Expand All @@ -109,7 +109,7 @@ jobs:
with:
persist-credentials: false
- name: Check local links and anchors
uses: melodic-software/ci-workflows/.github/actions/lychee-offline@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/lychee-offline@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
config: lychee.toml

Expand All @@ -123,7 +123,7 @@ jobs:
with:
persist-credentials: false
- name: Scan comment hygiene
uses: melodic-software/ci-workflows/.github/actions/comment-hygiene@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/comment-hygiene@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0

actionlint:
name: Actionlint
Expand All @@ -135,7 +135,7 @@ jobs:
with:
persist-credentials: false
- name: Lint workflows
uses: melodic-software/ci-workflows/.github/actions/actionlint@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/actionlint@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0

jsonschema:
name: JSON schemas
Expand All @@ -147,12 +147,12 @@ jobs:
with:
persist-credentials: false
- name: Validate Dependabot configuration
uses: melodic-software/ci-workflows/.github/actions/check-jsonschema@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/check-jsonschema@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
builtin-schema: vendor.dependabot
files: .github/dependabot.yml
- name: Validate workflows
uses: melodic-software/ci-workflows/.github/actions/check-jsonschema@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/check-jsonschema@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
builtin-schema: vendor.github-workflows
files: .github/workflows/*.yml
Expand All @@ -167,7 +167,7 @@ jobs:
with:
persist-credentials: false
- name: Check executable bits
uses: melodic-software/ci-workflows/.github/actions/exec-bit@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/exec-bit@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0

machine-specific-paths:
name: Machine-specific paths
Expand All @@ -179,7 +179,7 @@ jobs:
with:
persist-credentials: false
- name: Check machine-specific paths
uses: melodic-software/ci-workflows/.github/actions/machine-specific-paths@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/machine-specific-paths@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
# These files assert the official image's fixed in-container runner
# home. They contain no host/user path; keep the exception exact.
Expand All @@ -201,13 +201,13 @@ jobs:
with:
persist-credentials: false
- name: Check index-level EOL drift
uses: melodic-software/ci-workflows/.github/actions/eol-renormalize@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/actions/eol-renormalize@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0

zizmor:
name: Zizmor
permissions:
contents: read # Reusable advisory audit reads the checked-in workflow graph.
uses: melodic-software/ci-workflows/.github/workflows/zizmor.yml@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/workflows/zizmor.yml@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
paths: .

Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:
go-quality:
permissions:
contents: read
uses: melodic-software/ci-workflows/.github/workflows/go-quality.yml@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/workflows/go-quality.yml@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
config: .golangci.yml

Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/do-not-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: do-not-merge

# Blocks the merge while the PR carries the do-not-merge label. Thin caller of
# the shared do-not-merge-gate reusable; the emitted required-check context is
# `do-not-merge / do-not-merge`. pull_request_target runs the base-branch
# definition (the gate reads label metadata only — no head code runs);
# labeled/unlabeled re-evaluate the gate when the label changes. Public repo:
# runs on the reusable's hosted default runner.
on:
pull_request_target:
types: [opened, reopened, synchronize, labeled, unlabeled]
merge_group:

permissions:
pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
do-not-merge:
permissions:
pull-requests: read
uses: melodic-software/ci-workflows/.github/workflows/do-not-merge-gate.yml@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
2 changes: 1 addition & 1 deletion .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
permissions:
contents: read # Reusable checker reads repository Markdown.
issues: write # Reusable checker maintains the scheduled failure issue.
uses: melodic-software/ci-workflows/.github/workflows/link-check.yml@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/workflows/link-check.yml@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
with:
args: >-
--cache
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/pr-issue-linkage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: pr-issue-linkage

# Requires the PR body to carry a native closing keyword (or the literal
# "No linked issue") and a non-empty "## Related" section. Thin caller of the
# shared pr-issue-linkage reusable; the emitted required-check context is
# `pr-issue-linkage / pr-issue-linkage`. pull_request_target runs the
# base-branch definition (the gate reads PR body metadata only — no head code
# runs); `edited` re-validates on a body edit. Public repo: runs on the
# reusable's hosted default runner.
on:
pull_request_target:
types: [opened, edited, reopened, synchronize]
merge_group:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
pr-issue-linkage:
permissions: {}
uses: melodic-software/ci-workflows/.github/workflows/pr-issue-linkage.yml@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
2 changes: 1 addition & 1 deletion .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
pr-title:
permissions:
pull-requests: read # Reusable semantic-title gate requires no write permission.
uses: melodic-software/ci-workflows/.github/workflows/semantic-pr.yml@b927829fd0f8888b4dbccccdf7b27596ba453940 # v0.4.0
uses: melodic-software/ci-workflows/.github/workflows/semantic-pr.yml@c36e8810832f27a2715af9422af6e191b0c5df66 # v0.5.0
4 changes: 2 additions & 2 deletions release/dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@
"repositoryPins": [
{
"repository": "melodic-software/ci-workflows",
"commit": "b927829fd0f8888b4dbccccdf7b27596ba453940",
"source": "https://github.com/melodic-software/ci-workflows/tree/b927829fd0f8888b4dbccccdf7b27596ba453940"
"commit": "c36e8810832f27a2715af9422af6e191b0c5df66",
"source": "https://github.com/melodic-software/ci-workflows/tree/c36e8810832f27a2715af9422af6e191b0c5df66"
}
],
"reusableWorkflows": []
Expand Down