Skip to content

Commit 6635a06

Browse files
author
Moritz Clasmeier
committed
Integrate in build pipeline
1 parent 1e16770 commit 6635a06

1 file changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,26 @@ jobs:
6060
# Tag with version string from 'make version'.
6161
type=raw,value=${{ steps.build-meta.outputs.version }}
6262
63-
- name: Build and push Docker image
63+
- name: Build and push slim image
64+
id: docker_build_slim
65+
uses: docker/build-push-action@v6
66+
with:
67+
context: .
68+
platforms: linux/amd64,linux/arm64
69+
push: true
70+
tags: ${{ steps.meta.outputs.tags }}-slim
71+
labels: ${{ steps.meta.outputs.labels }}
72+
build-args: |
73+
VERSION=${{ steps.build-meta.outputs.version }}
74+
GIT_COMMIT=${{ steps.build-meta.outputs.git_commit }}
75+
BUILD_DATE=${{ steps.build-meta.outputs.build_date }}
76+
VARIANT=slim
77+
cache-from: |
78+
type=gha
79+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
80+
cache-to: type=gha,mode=max
81+
82+
- name: Build and push image
6483
id: docker_build
6584
uses: docker/build-push-action@v6
6685
with:
@@ -78,5 +97,8 @@ jobs:
7897
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
7998
cache-to: type=gha,mode=max
8099

81-
- name: Image digest
82-
run: echo "Image pushed with digest ${{ steps.docker_build.outputs.digest }}"
100+
- name: Images pushed
101+
run: |
102+
echo "Images pushed:"
103+
echo "- ${{ steps.meta.outputs.tags }}-slim:${{ steps.docker_build_slim.outputs.imageid }}"
104+
echo "- ${{ steps.meta.outputs.tags }}:${{ steps.docker_build.outputs.imageid }}"

0 commit comments

Comments
 (0)