From ee7ba9ed055cc6b9752237d6793ac2b1eeb77600 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 10 Jul 2024 11:59:29 -0600 Subject: [PATCH] chore(GHA): update git diff on samples directories (#522) * chore(GHA): adjust git diff * Update description * Fix bug in component sample path --- .github/workflows/analyze-builds.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/analyze-builds.yml b/.github/workflows/analyze-builds.yml index 2c9ddaee2..3b70d6104 100644 --- a/.github/workflows/analyze-builds.yml +++ b/.github/workflows/analyze-builds.yml @@ -20,7 +20,8 @@ jobs: # This step involves analyzing if any files changed in the branch, if so we'll create zip files current_branch=$(git rev-parse --abbrev-ref HEAD) # did any files change in component or core samples - samples_changed=$(git diff --name-only "$current_branch" $(git merge-base "$current_branch" origin/main) -- "./core-samples" "./components") + # compare against version before the last commit in the branch + samples_changed=$(git diff --name-only "$current_branch" $(git merge-base "$current_branch" HEAD^) -- "./core-samples" "./component-samples") if [ -z "$samples_changed" ]; then echo "no samples changed, skipping creation of zip files" echo "zipskip=true" >> $GITHUB_OUTPUT