@@ -57,20 +57,23 @@ jobs:
5757 # GHCR requires lowercase repository names
5858 OWNER_LOWER=$(echo "$OWNER" | tr '[:upper:]' '[:lower:]')
5959 FULL_IMAGE="ghcr.io/$OWNER_LOWER/$IMAGE_NAME"
60- TAGS="$FULL_IMAGE:v$VERSION"
61- if [ "$UPDATE_LATEST" = "true" ]; then
62- TAGS="$TAGS,$FULL_IMAGE:latest"
63- fi
64- echo "TAGS=$TAGS" >> $GITHUB_OUTPUT
60+ TAGS_FULL="$FULL_IMAGE:v$VERSION"
61+ [ "$UPDATE_LATEST" = "true" ] && TAGS_FULL="$TAGS_FULL,$FULL_IMAGE:latest"
62+ echo "TAGS_FULL=$TAGS_FULL" >> $GITHUB_OUTPUT
63+
64+ TAGS_SLIM="$FULL_IMAGE:v$VERSION-slim"
65+ [ "$UPDATE_LATEST" = "true" ] && TAGS_SLIM="$TAGS_SLIM,$FULL_IMAGE:slim"
66+ echo "TAGS_SLIM=$TAGS_SLIM" >> $GITHUB_OUTPUT
6567 echo "FULL_IMAGE=$FULL_IMAGE" >> $GITHUB_OUTPUT
6668
67- - name : Build and push Docker image
69+ - name : Build and push full image
6870 uses : docker/build-push-action@v5
6971 with :
7072 context : ${{ inputs.context }}
7173 push : true
7274 platforms : linux/amd64,linux/arm64
73- tags : ${{ steps.docker-tags.outputs.TAGS }}
75+ build-args : VARIANT=full
76+ tags : ${{ steps.docker-tags.outputs.TAGS_FULL }}
7477 labels : |
7578 org.opencontainers.image.source=https://github.com/${{ github.repository }}
7679 org.opencontainers.image.version=${{ inputs.version }}
8184 index:org.opencontainers.image.source=https://github.com/${{ github.repository }}
8285 index:org.opencontainers.image.licenses=Apache-2.0
8386
87+ - name : Build and push slim image
88+ uses : docker/build-push-action@v5
89+ with :
90+ context : ${{ inputs.context }}
91+ push : true
92+ platforms : linux/amd64,linux/arm64
93+ build-args : VARIANT=slim
94+ tags : ${{ steps.docker-tags.outputs.TAGS_SLIM }}
95+ labels : |
96+ org.opencontainers.image.source=https://github.com/${{ github.repository }}
97+ org.opencontainers.image.version=${{ inputs.version }}
98+ org.opencontainers.image.revision=${{ github.sha }}
99+ org.opencontainers.image.title=${{ inputs.image_title }} (Slim)
100+ org.opencontainers.image.licenses=Apache-2.0
101+ annotations : |
102+ index:org.opencontainers.image.source=https://github.com/${{ github.repository }}
103+ index:org.opencontainers.image.licenses=Apache-2.0
104+
84105 - name : Scan Docker image for vulnerabilities
85106 uses : aquasecurity/trivy-action@0.34.0
86107 with :
0 commit comments