Skip to content

Commit e69aaab

Browse files
Add guard for invalid dbt-package-version input
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
1 parent 8229635 commit e69aaab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/bump-version.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ jobs:
7070
- name: Determine package version
7171
id: pkg-version
7272
run: |
73-
if [ -n "${{ needs.validate-version.outputs.validated-dbt-package-version }}" ]; then
73+
if [ -n "${{ inputs.dbt-package-version }}" ] && [ -z "${{ needs.validate-version.outputs.validated-dbt-package-version }}" ]; then
74+
echo "::error::Invalid dbt-package-version input"
75+
exit 1
76+
elif [ -n "${{ needs.validate-version.outputs.validated-dbt-package-version }}" ]; then
7477
echo "version=${{ needs.validate-version.outputs.validated-dbt-package-version }}" >> $GITHUB_OUTPUT
7578
else
7679
echo "version=${{ needs.validate-version.outputs.default-dbt-package-version }}" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)