From 965f8282ac1a00a3cbb9e277feb86e6114fd4d93 Mon Sep 17 00:00:00 2001 From: "congvc-bot[bot]" <3634010+congvc-bot[bot]@users.noreply.github.com> Date: Mon, 30 Nov 2026 16:23:20 +0700 Subject: [PATCH] ci(release): run the stable-release schedule only upstream (CHE-10782) --- .github/workflows/weekly-release.yml | 6 +++++- test/weekly-release-workflow.test.ts | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/weekly-release.yml b/.github/workflows/weekly-release.yml index 534e5862da6..6a0219363f4 100644 --- a/.github/workflows/weekly-release.yml +++ b/.github/workflows/weekly-release.yml @@ -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: diff --git a/test/weekly-release-workflow.test.ts b/test/weekly-release-workflow.test.ts index bbd68f31d23..dc31f486a3a 100644 --- a/test/weekly-release-workflow.test.ts +++ b/test/weekly-release-workflow.test.ts @@ -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')!;