Skip to content
Draft
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
6 changes: 5 additions & 1 deletion .github/workflows/weekly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ permissions: {}
jobs:
cut:
name: Cut the release
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
# Fork-only (CHE-10782): the fork's stable is an upstream commit with no
# free-tests check run and no published release, so its schedule can only
# fail with NO_GREEN_COMMIT; only upstream runs the schedule. A dispatch
# (dry run, hotfix) still runs in any repository.
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && (github.event_name != 'schedule' || github.repository == 'garrytan/gstack')
runs-on: ubuntu-24.04
timeout-minutes: 20
permissions:
Expand Down
3 changes: 2 additions & 1 deletion test/weekly-release-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ describe('weekly-release.yml', () => {

test('the cut job runs only off main for a schedule or dispatch, writes contents, reads checks, and rejects a ref that is not a 40-hex SHA', () => {
const cut = wf.jobs.cut!;
expect(cut.if).toBe("github.event_name != 'pull_request' && github.ref == 'refs/heads/main'");
// Fork-only (CHE-10782): cheese-work/gstack has no free-tests gate on stable's commit, so its schedule fails daily with NO_GREEN_COMMIT; only upstream runs the schedule. A dispatch still runs anywhere.
expect(cut.if).toBe("github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && (github.event_name != 'schedule' || github.repository == 'garrytan/gstack')");
expect(cut.permissions).toEqual({ contents: 'write', checks: 'read', actions: 'read', issues: 'read', 'pull-requests': 'read' });
expect(cut.steps.find(s => s.uses?.startsWith('actions/checkout@'))!.with).toEqual({ 'fetch-depth': 0 });
const plan = cut.steps.find(s => s.name === 'Plan and cut')!;
Expand Down
Loading