chore: add docker scout

This commit is contained in:
Ruben Fiszel
2024-04-03 16:40:19 +02:00
parent 9459db00b6
commit 30fdd4ee88
2 changed files with 58 additions and 0 deletions
+16
View File
@@ -419,6 +419,22 @@ jobs:
docker buildx imagetools create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:dev --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:latest
docker buildx imagetools create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:dev --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:main
# docker_scout_ee:
# runs-on: ubicloud
# needs: [tag_latest_ee]
# steps:
# - name: Docker Scout
# id: docker-scout
# uses: docker/scout-action@v1
# with:
# dockerhub-
# command: cves,recommendations,compare
# to-latest: true
# ignore-base: true
# ignore-unchanged: true
# only-fixed: true
build_ee_cuda:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: [build_ee]
+42
View File
@@ -0,0 +1,42 @@
name: Docker Scout, verify images
on:
schedule:
- cron: "0 0 */1 * *"
workflow_dispatch:
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubicloud
permissions:
contents: read
packages: write
steps:
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2.5.0
with:
driver-opts: |
image=moby/buildkit:v0.10.6
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2.1.0
with:
username: windmilllabs
password: ${{ secrets.DOCKER_PAT }}
- name: Docker Scout
id: docker-scout
uses: docker/scout-action@v1
with:
command: quickview,cves,recommendation
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:main
only-severities: critical,high
write-comment: false
github-token: ${{ secrets.GITHUB_TOKEN }} # to be able to write the comment