From 715f94653e2978d765595575fa78770b610a6d08 Mon Sep 17 00:00:00 2001 From: Jake Lee Kennedy <1731150+Jakeii@users.noreply.github.com> Date: Thu, 23 Jul 2026 12:03:16 +0100 Subject: [PATCH 1/2] disable some checks on main --- .github/workflows/build-check.yml | 2 +- .github/workflows/cicd.yml | 5 +++++ .github/workflows/dcr-chromatic.yml | 8 +++----- .github/workflows/schema-check.yml | 2 +- .github/workflows/stories-check.yml | 2 +- .github/workflows/typescript.yml | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index daa59bfb557..76c22fe4cf5 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -2,7 +2,7 @@ name: DCR Build Check on: merge_group: types: [checks_requested] - push: + pull_request: paths-ignore: - 'dotcom-rendering/docs/**' diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index a8da3224e3d..09237e1adc8 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -23,19 +23,24 @@ jobs: production-image-digest: ${{ needs.production-container.outputs.imageDigest }} prettier: + if: github.ref != 'refs/heads/main' uses: ./.github/workflows/prettier.yml jest: + if: github.ref != 'refs/heads/main' uses: ./.github/workflows/jest.yml lint: + if: github.ref != 'refs/heads/main' uses: ./.github/workflows/lint.yml islands: + if: github.ref != 'refs/heads/main' uses: ./.github/workflows/check-islands.yml playwright: needs: [container] + if: github.ref != 'refs/heads/main' uses: ./.github/workflows/playwright.yml with: container-image: ${{ needs.container.outputs.container-image }} diff --git a/.github/workflows/dcr-chromatic.yml b/.github/workflows/dcr-chromatic.yml index 5516bcf2c4d..ec476ba861f 100644 --- a/.github/workflows/dcr-chromatic.yml +++ b/.github/workflows/dcr-chromatic.yml @@ -3,8 +3,6 @@ name: DCR Chromatic 👓 on: merge_group: types: [checks_requested] - push: - branches: [main] pull_request: types: [opened, labeled, synchronize] @@ -31,14 +29,14 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - name: Checkout - On Push Event uses: actions/checkout@v6 - if: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }} + if: ${{ github.event_name == 'merge_group' }} with: fetch-depth: 0 - name: Set up Node environment # Only needed for a full Chromatic run. if: | - (github.event_name == 'push' || github.event_name == 'merge_group') || + github.event_name == 'merge_group' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run_chromatic')) uses: ./.github/actions/setup-node-env @@ -51,7 +49,7 @@ jobs: NODE_OPTIONS: '--max_old_space_size=4096' uses: chromaui/action@v17.4.1 if: | - (github.event_name == 'push' || github.event_name == 'merge_group') || + github.event_name == 'merge_group' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run_chromatic')) || (github.event_name == 'pull_request' && needs.check-paths.outputs.relevant != 'true') diff --git a/.github/workflows/schema-check.yml b/.github/workflows/schema-check.yml index 4065f8eb619..6a5c0738e8a 100644 --- a/.github/workflows/schema-check.yml +++ b/.github/workflows/schema-check.yml @@ -2,7 +2,7 @@ name: DCR Schema Check on: merge_group: types: [checks_requested] - push: + pull_request: paths-ignore: - 'dotcom-rendering/docs/**' diff --git a/.github/workflows/stories-check.yml b/.github/workflows/stories-check.yml index 8a2861692ba..23bf93eee35 100644 --- a/.github/workflows/stories-check.yml +++ b/.github/workflows/stories-check.yml @@ -2,7 +2,7 @@ name: DCR Stories Check on: merge_group: types: [checks_requested] - push: + pull_request: paths-ignore: - 'dotcom-rendering/docs/**' diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index 04cb4a1ddaa..29b16a82ed6 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -2,7 +2,7 @@ name: DCR typescript 🕵‍♀ on: merge_group: types: [checks_requested] - push: + pull_request: paths-ignore: - 'dotcom-rendering/docs/**' From ce6e926513931536681d7d1ecf5058ae47765dde Mon Sep 17 00:00:00 2001 From: Jake Lee Kennedy <1731150+Jakeii@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:44:05 +0100 Subject: [PATCH 2/2] Ensure publish runs on push to main Co-authored-by: Copilot --- .github/workflows/cicd.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 09237e1adc8..2aa632e094b 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -51,7 +51,16 @@ jobs: contents: read pull-requests: write # required by riff-raff action needs: [container, islands, prettier, jest, lint, playwright] - if: github.event_name == 'push' # We don't need a riff-raff deployment for merge_group events + # We don't need a riff-raff deployment for merge_group events. + # `!cancelled()` forces this job to be evaluated even when some of the + # `needs` jobs are skipped (the checks are skipped on push to main), and + # `!contains(needs.*.result, 'failure')` still blocks publish if any needed + # job actually failed. Without a status-check function here, a skipped + # dependency would cause this job to be skipped as well. + if: >- + !cancelled() && + !contains(needs.*.result, 'failure') && + github.event_name == 'push' uses: ./.github/workflows/publish.yml with: container-image: ${{ needs.container.outputs.container-image }}