Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add container scanner step #12

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions .github/actions/build-and-push-to-ecr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,29 @@ runs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push image
id: build-and-push
uses: docker/build-push-action@v5
- name: Build image
id: build
uses: docker/build-push-action@v6
with:
context: ${{ inputs.docker-build-context }}
file: ${{ inputs.dockerfile-path }}
platforms: ${{ inputs.docker-build-platforms }}
push: false
tags: ${{ steps.login-ecr.outputs.registry }}/${{ inputs.ecr-repository-name }}:${{ inputs.docker-image-tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: ${{ inputs.docker-build-args }}
no-cache: ${{ inputs.docker-no-cache }}
- name: Run Container Scan
id: container-scan
uses: experian-marketing-services/gha-container-scanner@v1
with:
container: ${{ steps.login-ecr.outputs.registry }}/${{ inputs.ecr-repository-name }}:${{ inputs.docker-image-tag }}
wiz_key_id: ${{ secrets.WIZ_KEY_ID }}
wiz_key_secret: ${{ secrets.WIZ_KEY_SECRET }}
- name: Push image
id: push
uses: docker/build-push-action@v6
with:
context: ${{ inputs.docker-build-context }}
file: ${{ inputs.dockerfile-path }}
Expand Down