Skip to content

Commit

Permalink
fix: no run on some condition
Browse files Browse the repository at this point in the history
Signed-off-by: Jason C. Leach <[email protected]>
  • Loading branch information
jleach committed Oct 23, 2024
1 parent a745b18 commit d550713
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/actions/early-exit-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ runs:
id: check_output
shell: bash
run: |
output=$(git diff --name-only origin/main..HEAD | grep -E '^(app/.*)|(.yarn/.*)|(.github/workflows/.*)' | wc -l)
echo "output=$output" >> $GITHUB_ENV
change_count=$(git diff --name-only origin/main..HEAD | grep -E '^(app/.*)|(.yarn/.*)|(.github/workflows/.*)' | wc -l)
echo "${{ change_count }} files changed in app, .yarn, or .github/workflows"
if [ $change_count -gt 0 ]; then
echo "result=false" >> $GITHUB_OUTPUT
else
echo "result=true" >> $GITHUB_OUTPUT
fi
- name: Record output
if: env.output > 0
shell: bash
run: |
echo "${{ env.output }} files changed in app, .yarn, or .github/workflows"
echo "result=false" >> $GITHUB_OUTPUT
# - name: Record output
# if: env.output > 0
# shell: bash
# run: |
# echo "${{ env.output }} files changed in app, .yarn, or .github/workflows"
# echo "result=false" >> $GITHUB_OUTPUT

0 comments on commit d550713

Please sign in to comment.