Add image scan to deb

This commit is contained in:
Xiaonan Shen 2020-11-19 22:42:16 -08:00
parent f0415daf4f
commit cd520fab72
No known key found for this signature in database
GPG Key ID: 211BF560D12417F5

View File

@ -42,7 +42,21 @@ jobs:
with: with:
username: ${{ secrets.REGISTRY_USERNAME }} username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }} password: ${{ secrets.REGISTRY_PASSWORD }}
- uses: docker/build-push-action@v2 - name: Build image without push
uses: docker/build-push-action@v2
with:
context: ./deb
file: ./deb/Dockerfile
load: true
tags: protonmail-bridge:latest
- name: Scan image
uses: anchore/scan-action@v2
with:
image: protonmail-bridge:latest
fail-build: true
severity-cutoff: critical
- name: Push image
uses: docker/build-push-action@v2
with: with:
context: ./deb context: ./deb
file: ./deb/Dockerfile file: ./deb/Dockerfile