From e9f51b16342fd6f7e9b67a1d741ce4b96d1e9218 Mon Sep 17 00:00:00 2001 From: Italo Pessoa Date: Tue, 4 Jun 2024 12:01:12 -0300 Subject: [PATCH] add slim toolkit --- .github/workflows/publish-api.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-api.yml b/.github/workflows/publish-api.yml index bbfa624..5e17cbf 100644 --- a/.github/workflows/publish-api.yml +++ b/.github/workflows/publish-api.yml @@ -86,7 +86,24 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha - cache-to: type=gha,mode=max + cache-to: type=gha,mode= + + - name: Slim docker image + id: slim + uses: kitabisa/docker-slim-action@v1 + env: + DSLIM_HTTP_PROBE: false + with: + target: ${{ env.IMAGE_NAME }}:latest + tag: "slim" + + # Push to the registry + - run: docker image push "${{ env.IMAGE_NAME }}:slim" + + # Dump the report + - run: echo "${REPORT}" + env: + REPORT: ${{ steps.slim.outputs.report }} # Sign the resulting Docker image digest except on PRs. # This will only write to the public Rekor transparency log when the Docker