We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84a6343 commit 086bbcdCopy full SHA for 086bbcd
.github/workflows/deploy-changed-samples.yml
@@ -27,7 +27,15 @@ jobs:
27
28
- name: Identify changed samples
29
run: |
30
- git diff --name-only HEAD $(git merge-base main HEAD) | grep '^samples/' | awk -F'/' '{print $1"/"$2}' | sort | uniq > changed_samples.txt
+ # 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
39
if [ ! -s changed_samples.txt ]; then
40
echo "No samples have changed. Exiting..."
41
exit 0
0 commit comments