carbon accounting trivy scan #348
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: azure-container-image-scan | |
on: | |
push: | |
pull_request: | |
# Publish `main` as Docker `latest` image. | |
branches: | |
- main | |
# Publish `v1.2.3` tags as releases. | |
tags: | |
- v* | |
jobs: | |
build-secure-and-push: | |
name: Scan cactus-example-carbon-accounting image | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/[email protected] | |
env: | |
# (Required) The token to use to make API calls to GitHub. | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- uses: actions/checkout@v1 | |
- name: Login to DockerHub Registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Build Images from Dockerfile | |
run: DOCKER_BUILDKIT=1 docker build -f ./examples/carbon-accounting/Dockerfile . -t cactus-example-carbon-accounting | |
- uses: Azure/[email protected] | |
name: Scan image for vulnerabilities | |
id: container-scan | |
continue-on-error: true | |
with: | |
image-name: cactus-example-carbon-accounting |