@@ -102,23 +102,22 @@ jobs:
102102 --no-cache-filter trimmed-all \
103103 $TAG .
104104
105- # - name: Install slim toolkit
106- # run: |
107- # curl -sL https://raw.githubusercontent.com/slimtoolkit/slim/master/scripts/install-slim.sh | sudo -E bash -
108- #
109- # - name: Slim the image
110- # run: |
111- # # Extract image name from TAG (remove -t prefix)
112- # IMAGE_NAME=$(echo "$TAG" | sed 's/-t //')
113- # chmod +x ./slim-image.sh
114- # ./slim-image.sh "$IMAGE_NAME" "${IMAGE_NAME}-slim" amd64
115- # # Replace original with slim version
116- # docker tag ${IMAGE_NAME}-slim $IMAGE_NAME
117- #
105+ - name : Install slim toolkit
106+ run : |
107+ curl -sL https://raw.githubusercontent.com/slimtoolkit/slim/master/scripts/install-slim.sh | sudo -E bash -
108+
109+ - name : Slim the image
110+ run : |
111+ # Extract image name from TAG (remove -t prefix)
112+ IMAGE_NAME=$(echo "$TAG" | sed 's/-t //')
113+ chmod +x ./slim-image.sh
114+ ./slim-image.sh "$IMAGE_NAME" "${IMAGE_NAME}-slim" amd64
115+
118116 - name : Push amd64 image
119117 run : |
120118 IMAGE_NAME=$(echo "$TAG" | sed 's/-t //')
121119 docker push $IMAGE_NAME
120+ docker push ${IMAGE_NAME}-slim
122121
123122 image_postgresql_arm64 :
124123 needs : image_postgresql_amd64
@@ -203,19 +202,18 @@ jobs:
203202 run : |
204203 curl -sL https://raw.githubusercontent.com/slimtoolkit/slim/master/scripts/install-slim.sh | sudo -E bash -
205204
206- # - name: Slim the image
207- # run: |
208- # # Extract image name from TAG (remove -t prefix)
209- # IMAGE_NAME=$(echo "$TAG" | sed 's/-t //')
210- # chmod +x ./slim-image.sh
211- # ./slim-image.sh "$IMAGE_NAME" "${IMAGE_NAME}-slim" arm64
212- # # Replace original with slim version
213- # docker tag ${IMAGE_NAME}-slim $IMAGE_NAME
205+ - name : Slim the image
206+ run : |
207+ # Extract image name from TAG (remove -t prefix)
208+ IMAGE_NAME=$(echo "$TAG" | sed 's/-t //')
209+ chmod +x ./slim-image.sh
210+ ./slim-image.sh "$IMAGE_NAME" "${IMAGE_NAME}-slim" arm64
214211
215212 - name : Push arm64 image
216213 run : |
217214 IMAGE_NAME=$(echo "$TAG" | sed 's/-t //')
218215 docker push $IMAGE_NAME
216+ docker push ${IMAGE_NAME}-slim
219217
220218 create_manifest :
221219 needs : [image_postgresql_amd64, image_postgresql_arm64]
@@ -228,11 +226,18 @@ jobs:
228226 echo "TAG=openremote/postgresql:develop" >> $GITHUB_ENV
229227 echo "TAG_AMD64=openremote/postgresql:develop-amd64" >> $GITHUB_ENV
230228 echo "TAG_ARM64=openremote/postgresql:develop-arm64" >> $GITHUB_ENV
229+ echo "TAG_SLIM=openremote/postgresql:develop-slim" >> $GITHUB_ENV
230+ echo "TAG_SLIM_AMD64=openremote/postgresql:develop-slim-amd64" >> $GITHUB_ENV
231+ echo "TAG_SLIM_ARM64=openremote/postgresql:develop-slim-arm64" >> $GITHUB_ENV
231232 else
232233 echo "TAG=openremote/postgresql:$TAG" >> $GITHUB_ENV
233234 echo "TAG_LATEST=openremote/postgresql:latest" >> $GITHUB_ENV
234235 echo "TAG_AMD64=openremote/postgresql:$TAG-amd64" >> $GITHUB_ENV
235236 echo "TAG_ARM64=openremote/postgresql:$TAG-arm64" >> $GITHUB_ENV
237+ echo "TAG_SLIM=openremote/postgresql:$TAG-slim" >> $GITHUB_ENV
238+ echo "TAG_SLIM_LATEST=openremote/postgresql:latest-slim" >> $GITHUB_ENV
239+ echo "TAG_SLIM_AMD64=openremote/postgresql:$TAG-slim-amd64" >> $GITHUB_ENV
240+ echo "TAG_SLIM_ARM64=openremote/postgresql:$TAG-slim-arm64" >> $GITHUB_ENV
236241 fi
237242 env :
238243 TAG : ${{ github.event.release.tag_name }}
@@ -249,3 +254,10 @@ jobs:
249254 if [ ! -z "$TAG_LATEST" ]; then
250255 docker buildx imagetools create -t $TAG_LATEST $TAG_AMD64 $TAG_ARM64
251256 fi
257+
258+ - name : Create and push multi-arch manifest for slim images
259+ run : |
260+ docker buildx imagetools create -t $TAG_SLIM $TAG_SLIM_AMD64 $TAG_SLIM_ARM64
261+ if [ ! -z "$TAG_SLIM_LATEST" ]; then
262+ docker buildx imagetools create -t $TAG_SLIM_LATEST $TAG_SLIM_AMD64 $TAG_SLIM_ARM64
263+ fi
0 commit comments