From 843d574c828648f41fa71539e8b9b2ffafb6dd45 Mon Sep 17 00:00:00 2001 From: "congvc-bot[bot]" <3634010+congvc-bot[bot]@users.noreply.github.com> Date: Wed, 25 Nov 2026 23:33:46 +0700 Subject: [PATCH] ci(release): cut stable releases only in garrytan/gstack (CHE-9814) The fork has no free-tests/main-backstop checks and v1.99.0.0 was never published, so the daily cut job failed on every run. Guard the cut job on github.repository; the pull-request dry run is unchanged. --- .github/workflows/weekly-release.yml | 3 ++- test/weekly-release-workflow.test.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/weekly-release.yml b/.github/workflows/weekly-release.yml index 534e5862da6..999bae66a0b 100644 --- a/.github/workflows/weekly-release.yml +++ b/.github/workflows/weekly-release.yml @@ -70,7 +70,8 @@ permissions: {} jobs: cut: name: Cut the release - if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + # CHE-9814: upstream only; forks have no free-tests/main-backstop checks and cut no releases. + if: github.repository == 'garrytan/gstack' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main' 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..7564f862b53 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'"); + // CHE-9814: the fork (cheese-work/gstack) has no free-tests/main-backstop checks and cuts no releases; only upstream cuts. + expect(cut.if).toBe("github.repository == 'garrytan/gstack' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'"); 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')!;