diff --git a/.github/actions/create-release-v1/action.yml b/.github/actions/create-release-v1/action.yml index f1cad08c..3a82eb46 100644 --- a/.github/actions/create-release-v1/action.yml +++ b/.github/actions/create-release-v1/action.yml @@ -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