File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change 1111 type : environment
1212
1313 stack_name :
14- description : Name of stack to apply permissions to
14+ description : Stack to update
1515 required : true
1616 type : string
1717
1818 branch_name :
1919 description : Branch to deploy
2020 required : true
2121
22+ strict_versioning :
23+ description : Use strict versioning (recommended)
24+ required : true
25+ type : boolean
26+ default : true
27+
2228permissions :
2329 id-token : write
2430 contents : read
@@ -72,12 +78,17 @@ jobs:
7278 this_version="$(./scripts/get-current-info.sh | jq -r .version)"
7379 deployed_version="$(terraform -chdir=terraform/infrastructure output --raw version)"
7480
75- if [ "${deployed_version}" != "${this_version}" ]; then
76- echo "Deployed version is ${deployed_version}, not ${this_version}"
77- #exit 1
78- fi
81+ echo "code-version=${this_version} deployed-version=${deployed_version}"
7982
80- echo "Deployed version matches this version: ${deployed_version}"
83+ if [ "${deployed_version}" != "${this_version}" ]
84+ then
85+ echo "${this_version} does not match deployed version: ${deployed_version}" 1>&2
86+
87+ if [ "${{ inputs.strict_versioning }}" == "true" ]; then
88+ echo "Strict version checking failed, cancelling workflow" 1>&2
89+ exit 1
90+ fi
91+ fi
8192
8293 build-permissions :
8394 name : Build permissions
You can’t perform that action at this time.
0 commit comments