Skip to content

Commit

Permalink
chore(GHA): update git diff on samples directories (#522)
Browse files Browse the repository at this point in the history
* chore(GHA): adjust git diff

* Update description

* Fix bug in component sample path
  • Loading branch information
andygup authored Jul 10, 2024
1 parent 04872ce commit ee7ba9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/analyze-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee7ba9e

Please sign in to comment.