File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1010 description : ' Image tag'
1111 required : true
1212 default : " 0"
13+ force :
14+ description : ' Force build'
15+ required : false
16+ default : " false"
1317
1418
1519
2731 - name : Set release tag
2832 shell : bash
2933 run : |
34+ # check that tag is matching regex x.y.x-release.<commit hash> or force flag is enabled
35+ if [[ ! ${{ inputs.release_tag }} =~ ^[0-9]+\.[0-9]+\.[0-9]+-release\.[0-9a-f]+$ ]] ; then
36+ echo "Tag ${{ inputs.release_tag }} is not matching regex x.y.x-release.<commithash>"
37+ if [[ "${{ inputs.force }}" == "true" ]] ; then
38+ echo "Force flag is enabled. Continue"
39+ else
40+ exit 1
41+ fi
42+ fi
3043 echo "TAG_NAME=$(echo ${{ inputs.release_tag }} | sed -E 's/^([0-9]*\.[0-9]*\.[0-9]*).*/\1/')-init.${{ inputs.init_image_tag }}" >> "$GITHUB_OUTPUT"
3144 id : set_tag
3245
@@ -100,4 +113,4 @@ jobs:
100113 SLACK_COLOR : ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
101114 SLACK_MESSAGE : " Tag ${{ inputs.release_tag }} | Platform ${{ matrix.agents.platform }}"
102115 SLACK_TITLE : Init contianer build status - ${{ job.status }}
103- SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
116+ SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
You can’t perform that action at this time.
0 commit comments