0
0
mirror of https://github.com/alex289/CleanArchitecture.git synced 2025-07-03 03:52:56 +00:00

feat: Add labels to the docker image (#55)

This commit is contained in:
Alex 2024-04-11 21:16:48 +02:00 committed by GitHub
commit ceea5a602d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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 }}