Skip to content

Commit f44df20

Browse files
mayocreamsyphar
authored andcommitted
Use metadata instead of tags
1 parent f966ebb commit f44df20

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,16 @@ jobs:
5050
password: ${{ secrets.GITHUB_TOKEN }}
5151
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
5252

53+
- name: Docker meta
54+
id: meta
55+
uses: docker/metadata-action@v5
56+
with:
57+
images: ghcr.io/${{ github.repository }}/${{ matrix.image }}:latest
58+
5359
- name: Build and push
5460
uses: docker/build-push-action@v6
5561
with:
5662
context: ${{ matrix.image }}/
5763
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
58-
tags: |
59-
ghcr.io/${{ github.repository }}/${{ matrix.image }}:latest
60-
ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ github.sha }}
64+
tags: ${{ steps.meta.outputs.tags }}
65+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)