Skip to content

Commit 0187470

Browse files
Update docker-build.yml
1 parent 58085be commit 0187470

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/docker-build.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ jobs:
3232
type=raw,value=latest
3333
type=raw,value={{date 'YYYYMMDD'}}
3434
35+
- name: Extract metadata for Alpine
36+
id: meta-alpine
37+
uses: docker/metadata-action@v5
38+
with:
39+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40+
tags: |
41+
type=raw,value=alpine
42+
type=raw,prefix=alpine-,value={{date 'YYYYMMDD'}}
43+
3544
- name: Build and push regular image
3645
uses: docker/build-push-action@v5
3746
with:
@@ -47,7 +56,5 @@ jobs:
4756
context: .
4857
file: ./Dockerfile-alpine
4958
push: true
50-
tags: |
51-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:alpine
52-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:alpine-{{date 'YYYYMMDD'}}
53-
labels: ${{ steps.meta.outputs.labels }}
59+
tags: ${{ steps.meta-alpine.outputs.tags }}
60+
labels: ${{ steps.meta-alpine.outputs.labels }}

0 commit comments

Comments
 (0)