From 0e2d60cdcae5e2a3b08e20c1a3192ed96fab5735 Mon Sep 17 00:00:00 2001 From: alex289 Date: Thu, 11 Apr 2024 21:13:03 +0200 Subject: [PATCH] feat: Add labels to the docker image --- .github/workflows/dotnet.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 99779b3..a73da96 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -54,11 +54,19 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} 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 uses: docker/build-push-action@v5 with: platforms: linux/amd64,linux/arm64 push: true + labels: ${{ steps.meta.outputs.labels }} tags: | ${{ env.DOCKER_IMAGE }}:latest ${{ env.DOCKER_IMAGE }}:${{ github.sha }}