File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ jobs:
266266 run : docker logout ${{ steps.login-ecr.outputs.registry }}
267267
268268 - name : Scan image
269- if : ${{ inputs.skip_image_scan != true && fromJson(vars.SKIP_IMAGE_SCAN) != true && matrix.component.skip_image_scan != true }}
269+ if : ${{ inputs.skip_image_scan != true && fromJson(vars.SKIP_IMAGE_SCAN || 'false' ) != true && matrix.component.skip_image_scan != true }}
270270 id : get-ecr-scan-result
271271 uses : ./tmp/github-workflows/.github/actions/get-ecr-scan-result
272272 with :
@@ -276,7 +276,7 @@ jobs:
276276 ecr_repository : ${{ matrix.component.ecr_repository }}
277277 image_tag : ${{ matrix.component.image_tag }}
278278 - name : Check scan results
279- if : ${{ inputs.skip_image_scan != true && fromJson(vars.SKIP_IMAGE_SCAN) != true && matrix.component.skip_image_scan != true }}
279+ if : ${{ inputs.skip_image_scan != true && fromJson(vars.SKIP_IMAGE_SCAN || 'false' ) != true && matrix.component.skip_image_scan != true }}
280280 run : |
281281 if [ "${{ steps.get-ecr-scan-result.outputs.critical }}" != "null" ] || [ "${{ steps.get-ecr-scan-result.outputs.high }}" != "null" ]; then
282282 echo "Docker image contains vulnerabilities at critical or high level"
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ name: build-product
22
33on :
44 workflow_call :
5+ inputs :
6+ runs_on :
7+ type : string
8+ required : false
9+ default : " ubuntu-22.04"
510 secrets :
611 DATAVISYN_BOT_REPO_TOKEN :
712 required : false
97102 image_tag2 : ${{ needs.prepare-build.outputs.image_tag2 }}
98103 build_time : ${{ needs.prepare-build.outputs.build_time }}
99104 stage : ${{ needs.prepare-build.outputs.stage }}
105+ runs_on : ${{ inputs.runs_on }}
100106 secrets : inherit
101107 build-workspace :
102108 needs : prepare-build
Original file line number Diff line number Diff line change 4646 type : number
4747 required : false
4848 default : 60
49+ runs_on :
50+ type : string
51+ required : false
52+ default : " ubuntu-22.04"
4953env :
5054 TIME_ZONE : " Europe/Vienna"
5155 NODE_VERSION : " 20.9"
@@ -62,7 +66,7 @@ permissions:
6266jobs :
6367 build-components :
6468 timeout-minutes : ${{ fromJSON(inputs.timeout) }}
65- runs-on : ubuntu-22.04
69+ runs-on : ${{ inputs.runs_on || ' ubuntu-22.04' }}
6670 steps :
6771 - name : Remove unnecessary files
6872 run : |
@@ -264,7 +268,7 @@ jobs:
264268 org.opencontainers.image.created=${{ inputs.build_time }}
265269 org.opencontainers.image.revision=${{ github.sha }}
266270 - name : scan image
267- if : ${{ steps.get-parameters.outputs.skip_image_check != 'true' }}
271+ if : ${{ fromJson(vars.SKIP_IMAGE_SCAN || 'false') != true && steps.get-parameters.outputs.skip_image_check != 'true' }}
268272 id : get-ecr-scan-result
269273 uses : ./tmp/github-workflows/.github/actions/get-ecr-scan-result
270274 with :
You can’t perform that action at this time.
0 commit comments