Skip to content

Commit 5ec896c

Browse files
himani2411Himani Anil Deshpande
andauthored
[GH] Add validation for input of pcluster-version (#683)
Co-authored-by: Himani Anil Deshpande <himanidp@amazon.com>
1 parent 02dfaef commit 5ec896c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/bump_version.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ jobs:
2121
pull-requests: write
2222
runs-on: ubuntu-latest
2323
steps:
24+
- name: Validate pcluster version format
25+
run: |
26+
if ! echo "${{ inputs.pcluster-version }}" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
27+
echo "Error: Invalid version format '${{ inputs.pcluster-version }}'. Expected format: X.Y.Z (e.g., 3.14.0)"
28+
exit 1
29+
fi
30+
echo "Version format validated: ${{ inputs.pcluster-version }}"
2431
- uses: actions/checkout@v2
2532
with:
2633
fetch-depth: 0

0 commit comments

Comments
 (0)