Skip to content

Commit 398f362

Browse files
committed
Add optional input to delete existing snapshots in update workflow
Refs: #7460
1 parent 8e0d24f commit 398f362

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/update-snapshots.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: 03 - Update Snapshots
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
delete_snapshots:
7+
description: 'Delete existing snapshots before update?'
8+
required: false
9+
default: false
10+
type: boolean
511

612
jobs:
713
update-snapshots:
@@ -58,7 +64,8 @@ jobs:
5864
- name: Build
5965
run: pnpm -r build
6066

61-
- name: Purge existing snapshots
67+
- name: Purge existing snapshots (optional)
68+
if: inputs.delete_snapshots == true
6269
run: find packages -name '*.png' -path '*/snapshots/*' | grep -v 'node_modules' | xargs rm # Remove any existing snapshots, except those in node_modules
6370

6471
- name: Display git status (before test-update)

0 commit comments

Comments
 (0)