Skip to content

Commit d550713

Browse files
committed
fix: no run on some condition
Signed-off-by: Jason C. Leach <jason.leach@fullboar.ca>
1 parent a745b18 commit d550713

File tree

1 file changed

+13
-8
lines changed
  • .github/workflows/actions/early-exit-check

1 file changed

+13
-8
lines changed

.github/workflows/actions/early-exit-check/action.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@ runs:
1010
id: check_output
1111
shell: bash
1212
run: |
13-
output=$(git diff --name-only origin/main..HEAD | grep -E '^(app/.*)|(.yarn/.*)|(.github/workflows/.*)' | wc -l)
14-
echo "output=$output" >> $GITHUB_ENV
13+
change_count=$(git diff --name-only origin/main..HEAD | grep -E '^(app/.*)|(.yarn/.*)|(.github/workflows/.*)' | wc -l)
14+
echo "${{ change_count }} files changed in app, .yarn, or .github/workflows"
15+
if [ $change_count -gt 0 ]; then
16+
echo "result=false" >> $GITHUB_OUTPUT
17+
else
18+
echo "result=true" >> $GITHUB_OUTPUT
19+
fi
1520
16-
- name: Record output
17-
if: env.output > 0
18-
shell: bash
19-
run: |
20-
echo "${{ env.output }} files changed in app, .yarn, or .github/workflows"
21-
echo "result=false" >> $GITHUB_OUTPUT
21+
# - name: Record output
22+
# if: env.output > 0
23+
# shell: bash
24+
# run: |
25+
# echo "${{ env.output }} files changed in app, .yarn, or .github/workflows"
26+
# echo "result=false" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)