Skip to content

Commit

Permalink
Update migration detection logic in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoerdbeentjes committed Oct 2, 2024
1 parent 2b12c78 commit 61e74c4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/staging-migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ jobs:
id: check_changes
run: |
if git show-ref --verify --quiet refs/remotes/origin/main; then
if git diff --name-only origin/main...HEAD | grep -q '^migrations/'; then
echo "changes=true" >> $GITHUB_ENV
if git merge-base --is-ancestor origin/main HEAD; then
if git diff --name-only origin/main...HEAD | grep -q '^migrations/'; then
echo "changes=true" >> $GITHUB_ENV
else
echo "changes=false" >> $GITHUB_ENV
fi
else
echo "changes=false" >> $GITHUB_ENV
fi
Expand Down

0 comments on commit 61e74c4

Please sign in to comment.