Skip to content

Commit

Permalink
fix(create-release): ensure action does not fail when migrations dir …
Browse files Browse the repository at this point in the history
…is provided but no new files are found (#170)
  • Loading branch information
Zidious authored May 20, 2024
1 parent d12e5d6 commit fce4751
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/actions/create-release-v1/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ runs:
echo "Repo url: $repo_url"
# Only get new files added to release branch that are within the provided migrations directory and end in .sql
new_migration_files=$(git diff --name-only --diff-filter=A origin/${{ inputs.base }}...origin/release -- "${{ inputs.migrations-dir }}" | grep -E '\.sql$')
# If the directory is provided but there are no new migration files, return an empty string
new_migration_files=$(git diff --name-only --diff-filter=A origin/${{ inputs.base }}...origin/release -- "${{ inputs.migrations-dir }}" | grep -E '\.sql$' || echo "")
if [ -n "$new_migration_files" ]; then
echo "## New migration files found:" >> /tmp/release-notes.txt
Expand Down

0 comments on commit fce4751

Please sign in to comment.