Skip to content

Commit 029a3a0

Browse files
authored
Add SKIP_IMAGE_SCAN var
1 parent 41028ca commit 029a3a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build-docker-artifacts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ jobs:
240240
run: docker logout ${{ steps.login-ecr.outputs.registry }}
241241

242242
- name: Scan image
243-
if: ${{ matrix.component.skip_image_scan != true }}
243+
if: ${{ fromJson(vars.SKIP_IMAGE_SCAN) != true && matrix.component.skip_image_scan != true }}
244244
id: get-ecr-scan-result
245245
uses: ./tmp/github-workflows/.github/actions/get-ecr-scan-result
246246
with:
@@ -250,7 +250,7 @@ jobs:
250250
ecr_repository: ${{ matrix.component.ecr_repository }}
251251
image_tag: ${{ matrix.component.image_tag }}
252252
- name: Check scan results
253-
if: ${{ matrix.component.skip_image_scan != true }}
253+
if: ${{ fromJson(vars.SKIP_IMAGE_SCAN) != true && matrix.component.skip_image_scan != true }}
254254
run: |
255255
if [ "${{ steps.get-ecr-scan-result.outputs.critical }}" != "null" ] || [ "${{ steps.get-ecr-scan-result.outputs.high }}" != "null" ]; then
256256
echo "Docker image contains vulnerabilities at critical or high level"

0 commit comments

Comments
 (0)