From 82eba1e8eae7c6e980c3c680fd2b3f1096a654d7 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 31 Mar 2025 18:56:01 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5(ci)=20force=20ci=20to=20fails=20if?= =?UTF-8?q?=20trivy=20fails?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If trivy fails we must stop the CI to avoid publishing images with security issues. --- .github/workflows/docker-hub.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 196a3f0e..84b23c7e 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -11,6 +11,7 @@ on: pull_request: branches: - 'main' + - 'ci/trivy-fails' env: DOCKER_USER: 1001:127 @@ -38,7 +39,6 @@ jobs: with: docker-build-args: '--target backend-production -f Dockerfile' docker-image-name: 'docker.io/lasuite/impress-backend:${{ github.sha }}' - continue-on-error: true - name: Build and push uses: docker/build-push-action@v6 @@ -72,7 +72,6 @@ jobs: with: docker-build-args: '-f src/frontend/Dockerfile --target frontend-production' docker-image-name: 'docker.io/lasuite/impress-frontend:${{ github.sha }}' - continue-on-error: true - name: Build and push uses: docker/build-push-action@v6 @@ -106,8 +105,7 @@ jobs: uses: numerique-gouv/action-trivy-cache@main with: docker-build-args: '-f src/frontend/servers/y-provider/Dockerfile --target y-provider' - docker-image-name: 'docker.io/lasuite/impress-frontend:${{ github.sha }}' - continue-on-error: true + docker-image-name: 'docker.io/lasuite/impress-y-provider:${{ github.sha }}' - name: Build and push uses: docker/build-push-action@v6