0
0
mirror of https://github.com/alex289/CleanArchitecture.git synced 2025-07-11 16:15:05 +00:00

feat: Add labels to the docker image

This commit is contained in:
alex289 2024-04-11 21:13:03 +02:00
parent 441a6d7822
commit 0e2d60cdca
No known key found for this signature in database
GPG Key ID: 573F77CD2D87F863

View File

@ -54,11 +54,19 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.DOCKER_IMAGE }}
- name: Build and push - name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: true push: true
labels: ${{ steps.meta.outputs.labels }}
tags: | tags: |
${{ env.DOCKER_IMAGE }}:latest ${{ env.DOCKER_IMAGE }}:latest
${{ env.DOCKER_IMAGE }}:${{ github.sha }} ${{ env.DOCKER_IMAGE }}:${{ github.sha }}