Skip to content

Commit 402637d

Browse files
committed
Require snapshot changes in "Update third-party tests" workflow
1 parent 3045243 commit 402637d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/update_third_party_tests.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,21 @@ jobs:
3939
env:
4040
TESTS: third_party_0 third_party_1 trycmd other ci
4141

42+
- name: Require snapshot changes
43+
id: snapshots
44+
run: |
45+
set +e
46+
git diff --quiet -- '*.stdout'
47+
status=$?
48+
set -e
49+
if [ "$status" -eq 1 ]; then
50+
echo "changed=true" >> "$GITHUB_OUTPUT"
51+
elif [ "$status" -ne 0 ]; then
52+
exit "$status"
53+
fi
54+
4255
- name: Create pull request
56+
if: steps.snapshots.outputs.changed == 'true'
4357
uses: peter-evans/create-pull-request@v8
4458
with:
4559
title: "Update third-party tests"

0 commit comments

Comments
 (0)