From eb1e341b5d0e4cee5bbac76d5a9d2df075e2a991 Mon Sep 17 00:00:00 2001 From: Dotta Date: Fri, 31 Jul 2026 05:54:35 +0000 Subject: [PATCH] ci(storybook-visual): let snapshot-update runs bootstrap without a baseline The update_snapshots dispatch path regenerates every snapshot, but the mandatory baseline download step failed on the unconfigured manifest, so the very first baseline could never be produced by the workflow. Co-Authored-By: Claude Fable 5 --- .github/workflows/storybook-visual.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/storybook-visual.yml b/.github/workflows/storybook-visual.yml index 9e7b60c1328..5524f6a313c 100644 --- a/.github/workflows/storybook-visual.yml +++ b/.github/workflows/storybook-visual.yml @@ -56,14 +56,20 @@ jobs: - name: Cache Storybook visual baseline archive uses: actions/cache@v6 + if: ${{ github.event.inputs.update_snapshots != 'true' }} with: path: tests/storybook-visual/.cache key: storybook-visual-baseline-${{ runner.os }}-${{ hashFiles('tests/storybook-visual/baseline-manifest.json') }} + # Snapshot-update (baseline bootstrap/regeneration) runs regenerate every + # snapshot from scratch, so they must not require an already-published + # baseline — otherwise the very first baseline could never be produced. - name: Download Storybook visual baseline + if: ${{ github.event.inputs.update_snapshots != 'true' }} run: pnpm storybook-visual:baseline download - name: Verify Storybook visual baseline + if: ${{ github.event.inputs.update_snapshots != 'true' }} run: pnpm storybook-visual:baseline verify - name: Build Storybook