Fix: Bump-version action regex pattern to work with beta1 (#58805)

Fixing bump version regex
This commit is contained in:
Timur Olzhabayev
2022-11-16 10:26:38 +01:00
committed by GitHub
parent 5bd15026ff
commit 174a039ee1

View File

@@ -17,7 +17,7 @@ jobs:
id: regex-match id: regex-match
with: with:
text: ${{ github.event.inputs.version }} text: ${{ github.event.inputs.version }}
regex: '^(\d+.\d+).\d+(?:-beta.\d+)?$' regex: '^(\d+.\d+).\d+(?:-beta\d+)?$'
- uses: actions-ecosystem/action-regex-match@v2.0.2 - uses: actions-ecosystem/action-regex-match@v2.0.2
if: ${{ inputs.version_call != '' }} if: ${{ inputs.version_call != '' }}
id: regex-match-version-call id: regex-match-version-call
@@ -29,7 +29,7 @@ jobs:
run: | run: |
echo "The input version format is not correct, please respect:\ echo "The input version format is not correct, please respect:\
major.minor.patch or major.minor.patch-beta.number format. \ major.minor.patch or major.minor.patch-beta.number format. \
example: 7.4.3 or 7.4.3-beta.1" example: 7.4.3 or 7.4.3-beta1"
exit 1 exit 1
- name: Validate input version call - name: Validate input version call
if: ${{ inputs.version_call != '' && steps.regex-match-version-call.outputs.match == '' }} if: ${{ inputs.version_call != '' && steps.regex-match-version-call.outputs.match == '' }}