From db5f189ce55267a979be073df4a21d17b68677bd Mon Sep 17 00:00:00 2001 From: ammnt Date: Sun, 2 Jun 2024 20:20:45 +0300 Subject: [PATCH] changed: the actions order before image push --- .github/workflows/build.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7284078..7e1b423 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,20 +66,6 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - - name: Slim the Docker image🚀 - uses: kitabisa/docker-slim-action@v1.1.1 - env: - DSLIM_HTTP_PROBE: false - with: - target: ghcr.io/ammnt/freenginx:main - tag: ghcr.io/ammnt/freenginx:main - overwrite: true - - - name: Test the Docker image🧪 - run: | - docker run -d --rm -p 127.0.0.1:8080:8080/tcp ghcr.io/ammnt/freenginx:main - curl -v http://127.0.0.1:8080 || exit 1 - - name: Analyze image with Docker Scout💊 uses: docker/scout-action@v1.9.3 with: @@ -115,7 +101,8 @@ jobs: uses: anchore/scan-action@v3.6.4 with: image: ghcr.io/ammnt/freenginx:main - fail-build: true + fail-build: false + severity-cutoff: critical - name: Upload Anchore report📊 uses: github/codeql-action/upload-sarif@v3 @@ -154,6 +141,20 @@ jobs: wget -qO clair-scanner https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64 && chmod +x clair-scanner ./clair-scanner --ip="$DOCKER_GATEWAY" ghcr.io/ammnt/freenginx:main || exit 0 + - name: Slim the Docker image🚀 + uses: kitabisa/docker-slim-action@v1.1.1 + env: + DSLIM_HTTP_PROBE: false + with: + target: ghcr.io/ammnt/freenginx:main + tag: ghcr.io/ammnt/freenginx:main + overwrite: true + + - name: Test the Docker image🧪 + run: | + docker run -d --rm -p 127.0.0.1:8080:8080/tcp ghcr.io/ammnt/freenginx:main + curl -v http://127.0.0.1:8080 || exit 1 + - name: Push the Docker images to registries💾 run: | docker push ghcr.io/ammnt/freenginx:main