Skip to content

Commit

Permalink
changed: the actions order before image push
Browse files Browse the repository at this point in the history
  • Loading branch information
ammnt committed Jun 2, 2024
1 parent 49b88a9 commit db5f189
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,6 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Slim the Docker image🚀
uses: kitabisa/[email protected]
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/[email protected]
with:
Expand Down Expand Up @@ -115,7 +101,8 @@ jobs:
uses: anchore/[email protected]
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
Expand Down Expand Up @@ -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/[email protected]
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
Expand Down

0 comments on commit db5f189

Please sign in to comment.