Commit 54bb28f
authored
ci: don't fail update-snapshots when there are no changes (tldraw#9070)
The `update-snapshots` workflow regenerates Playwright snapshots and
commits them via huppy-bot. When a run produces no snapshot changes, the
`git commit` step failed with `nothing to commit, working tree clean`
(exit 1), so the workflow reported a red ✗ even though nothing was wrong
— there was simply nothing to update.
This guards the commit step: if nothing is staged, it logs a message and
exits 0 instead of attempting an empty commit. Runs that do produce
snapshot changes still commit and push as before.
## Code changes
| File | +/- |
| --- | --- |
| `.github/workflows/playwright-update-snapshots.yml` | +4 / −0 |
## Test plan
- A label-triggered run with no snapshot diffs now completes green
instead of failing on the empty commit.
- A run that does produce snapshot changes still commits and pushes (the
guard only short-circuits the empty case).1 parent 4319206 commit 54bb28f
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
0 commit comments