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 10
10
description : ' Image tag'
11
11
required : true
12
12
default : " 0"
13
+ force :
14
+ description : ' Force build'
15
+ required : false
16
+ default : " false"
13
17
14
18
15
19
27
31
- name : Set release tag
28
32
shell : bash
29
33
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
30
43
echo "TAG_NAME=$(echo ${{ inputs.release_tag }} | sed -E 's/^([0-9]*\.[0-9]*\.[0-9]*).*/\1/')-init.${{ inputs.init_image_tag }}" >> "$GITHUB_OUTPUT"
31
44
id : set_tag
32
45
@@ -100,4 +113,4 @@ jobs:
100
113
SLACK_COLOR : ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
101
114
SLACK_MESSAGE : " Tag ${{ inputs.release_tag }} | Platform ${{ matrix.agents.platform }}"
102
115
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