Skip to content

Commit

Permalink
feat: add new step to gracefully exit
Browse files Browse the repository at this point in the history
  • Loading branch information
botanical committed Feb 15, 2025
1 parent e8b31a9 commit 22c208b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,22 @@ jobs:
with:
files: ingestion-data/staging/dataset-config/**.json

- name: List all newly added files and exit gracefully if none
- name: List all newly added files
env:
ADDED_FILES: ${{ steps.changed-files.outputs.added_files }}
ADDED_FILES_COUNT: $${{ steps.changed-files.outputs.added_files_count}}
run: |
if [ "$ADDED_FILES_COUNT" -eq 0 ]; then
echo "🕵️ No new files found. Exiting workflow."
exit 0
fi
for file in ${ADDED_FILES}; do
echo "$file was added"
done
echo "added_files_count: ${ADDED_FILES_COUNT}"
- name: Exit early if no new files
if: ${{ steps.changed-files.outputs.added_files_count == 0 }}
run: |
echo "🕵️ No new files found. Exiting workflow early."
exit 0
# Makes request to /dataset/publish endpoint
# Outputs only files that were successfully published
# Used by other steps
Expand Down

0 comments on commit 22c208b

Please sign in to comment.