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
5 changes: 1 addition & 4 deletions .github/workflows/self-hosted-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Self-hosted release

on:
workflow_dispatch:
push:
tags:
- "self-hosted-v*"
Expand All @@ -15,9 +14,7 @@ env:

jobs:
certified-matrix:
if:
startsWith(github.ref, 'refs/tags/self-hosted-v') || github.event_name ==
'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/self-hosted-v')
strategy:
fail-fast: false
matrix:
Expand Down
3 changes: 2 additions & 1 deletion tests/contract/release/self-hosted-matrix.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
expect(workflowSource).toContain("actual-release-assets.txt");
});

it("pins every action and exposes no privileged pull-request release event", async () => {
it("pins every action and exposes no privileged non-tag release event", async () => {
const workflowSource = await readFile(
".github/workflows/self-hosted-release.yml",
"utf8",
Expand All @@ -152,6 +152,7 @@
);
expect(uses.length).toBeGreaterThan(0);
expect(uses.every((use) => /@[0-9a-f]{40}$/.test(use))).toBe(true);
expect(workflowSource).not.toMatch(/^ workflow_dispatch:/mu);

Check failure on line 155 in tests/contract/release/self-hosted-matrix.test.ts

View workflow job for this annotation

GitHub Actions / static

Spaces are hard to count. Use {2}
expect(workflowSource).not.toMatch(/^\s+pull_request(?:_target)?:/mu);
expect(workflowSource).not.toContain("pull-requests: write");
});
Expand Down
Loading