Skip to content

Commit

Permalink
Add conditional check for changed files in GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski committed Jun 29, 2024
1 parent b30f023 commit 1442fd9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ jobs:
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
# for file in ${ALL_CHANGED_FILES}; do
# echo "$file was changed"
# done
ruff check ${ALL_CHANGED_FILES}
- run: |
if [ -n "${ALL_CHANGED_FILES}" ]; then
# for file in ${ALL_CHANGED_FILES}; do
# echo "$file was changed"
# done
ruff check ${ALL_CHANGED_FILES}
else
echo "No files changed"
fi

0 comments on commit 1442fd9

Please sign in to comment.