Skip to content

Commit 84a6343

Browse files
find changed samples from the point of divergence
instead of comparing the current commit to `main`, compare the current commit to the commit from which we branched. (the common ancestor between our branch and main). Otherwise, as main moves forward, our changeset will include changes on our branch, and the inverse of the changes on main (since those changes will not exist on our branch).
1 parent a950768 commit 84a6343

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

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

2828
- name: Identify changed samples
2929
run: |
30-
git diff --name-only HEAD main | grep '^samples/' | awk -F'/' '{print $1"/"$2}' | sort | uniq > changed_samples.txt
30+
git diff --name-only HEAD $(git merge-base main HEAD) | grep '^samples/' | awk -F'/' '{print $1"/"$2}' | sort | uniq > changed_samples.txt
3131
if [ ! -s changed_samples.txt ]; then
3232
echo "No samples have changed. Exiting..."
3333
exit 0

0 commit comments

Comments
 (0)