Skip to content

Commit c9f073e

Browse files
committed
skip remaining steps if no json file found
1 parent 011d6b1 commit c9f073e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/soup-approval-verification-workflow.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,20 @@ jobs:
3333
JSON_FILES=$(git diff --name-only --diff-filter=AM "origin/$BASE_BRANCH" -- .soups/**/*.json || true)
3434
if [ -z "$JSON_FILES" ]; then
3535
echo "No JSON files changed in this PR"
36+
37+
echo "skip-remaining-steps=true" >> "$GITHUB_OUTPUT"
3638
exit 0
3739
fi
38-
40+
41+
echo "skip-remaining-steps=false" >> "$GITHUB_OUTPUT"
3942
echo "Found JSON files in PR: $JSON_FILES"
4043
{
4144
echo "SOUP_FILES<<EOF"
4245
echo "$JSON_FILES"
4346
echo "EOF"
4447
} >> "$GITHUB_ENV"
4548
- name: Verification - Requirements
49+
if: steps.fetch-soup-files.outputs.skip-remaining-steps == 'false'
4650
run: |
4751
STATUS=0
4852
@@ -95,6 +99,7 @@ jobs:
9599
echo "All changed files have valid requirement statuses."
96100
fi
97101
- name: Verification - Version (Vulnerability)
102+
if: steps.fetch-soup-files.outputs.skip-remaining-steps == 'false'
98103
shell: bash
99104
run: |
100105
SUCCESS_FILES=()
@@ -148,6 +153,7 @@ jobs:
148153
exit 1
149154
fi
150155
- name: Update approval information
156+
if: steps.fetch-soup-files.outputs.skip-remaining-steps == 'false'
151157
shell: bash
152158
env:
153159
ALLOWED_APPROVERS: ${{ vars.SOUP_APPROVERS }}
@@ -194,6 +200,7 @@ jobs:
194200
done
195201
196202
- name: Commit approval updates
203+
if: steps.fetch-soup-files.outputs.skip-remaining-steps == 'false'
197204
shell: bash
198205
run: |
199206
git config --local user.email "[email protected]"

0 commit comments

Comments
 (0)