From b5d20335d5181f78e0f9eeb8b4973a2986246081 Mon Sep 17 00:00:00 2001 From: Alex Barcelo Date: Wed, 12 Feb 2025 17:07:21 +0100 Subject: [PATCH] fixing metadata for docker image generation --- .github/workflows/docker-publish.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 7fcf1a2..cd8c6cf 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -63,6 +63,16 @@ jobs: type=edge,suffix=-py${{ matrix.python-version }},branch=main type=edge,enable=${{ matrix.python-version == '3.10' }},branch=main + # Extract metadata (tags, labels) for Docker + - name: Extract Docker metadata + id: legacy-deps-meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=edge,suffix=-legacydeps-py${{ matrix.python-version }},branch=main + type=edge,suffix=-legacydeps,enable=${{ matrix.python-version == '3.10' }},branch=main + # Build and push Docker image with Buildx (don't push on PR) - name: Build and push Docker image id: build-and-push @@ -89,7 +99,7 @@ jobs: PYTHON_VERSION=${{ matrix.python-version }}-bullseye LEGACY_DEPS=True push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }}-legacydeps - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.legacy-deps-meta.outputs.tags }} + labels: ${{ steps.legacy-deps-meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max