Skip to content

Commit 086bbcd

Browse files
avoid trying to test removed samples
1 parent 84a6343 commit 086bbcd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/deploy-changed-samples.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ jobs:
2727

2828
- name: Identify changed samples
2929
run: |
30-
git diff --name-only HEAD $(git merge-base main HEAD) | grep '^samples/' | awk -F'/' '{print $1"/"$2}' | sort | uniq > changed_samples.txt
30+
# Identify the samples that have changed since the last commit on main
31+
# and save them to a file for later use.
32+
# remove paths to samples which have been renamed or deleted.
33+
git diff --name-only HEAD $(git merge-base main HEAD) \
34+
| grep '^samples/' \
35+
| awk -F'/' '{print $1"/"$2}' \
36+
| sort \
37+
| uniq \
38+
| while read -r dir; do [ -d "$dir" ] && echo "$dir"; done > changed_samples.txt
3139
if [ ! -s changed_samples.txt ]; then
3240
echo "No samples have changed. Exiting..."
3341
exit 0

0 commit comments

Comments
 (0)