Skip to content

Commit e042523

Browse files
committed
sonarcloud: validate release_type on major/minor/patch
1 parent 3a4d8e8 commit e042523

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/version_upgrade.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
upgrade-version:
2121
runs-on: ubuntu-latest
2222
env:
23-
RELEASE_TYPE: ${{ inputs.release_type == 'major' && 'major' || 'minor' }}
23+
# check if the input is valid, if not set it to empty string, if valid it will be used in the poetry version command
24+
RELEASE_TYPE: ${{ (inputs.release_type == 'major' || inputs.release_type == 'minor' || inputs.release_type == 'patch') && inputs.release_type || '' }}
2425
outputs:
2526
job_output_version: ${{ steps.get-version.outputs.PROJECT_VERSION}}
2627
steps:

0 commit comments

Comments
 (0)