Skip to content

Conversation

@BLACK4585
Copy link

The source label in the Docker container helps the Renovate bot correctly fetch and show changelogs for new versions fetched from Docker Hub.
This is described here:
https://docs.renovatebot.com/modules/datasource/docker/#description

This is useful when using GitOps, as I do.

@hollanbm
Copy link

@BLACK4585 @CyferShepard The reason the labels are missing is that the output from the docker-metadata step is not referenced during image build

Before

      - name: Build Docker image
        uses: docker/build-push-action@v5
        with:
          context: .
          push: true
          tags: |
            cyfershepard/jellystat:latest
            cyfershepard/jellystat:${{ env.VERSION }}
            ghcr.io/cyfershepard/jellystat:latest
            ghcr.io/cyfershepard/jellystat:${{ env.VERSION }}
          platforms: linux/amd64,linux/arm64,linux/arm/v7

AFTER

      - name: Build Docker image
        uses: docker/build-push-action@v5
        with:
          context: .
          push: true
          labels: ${{ steps.meta.outputs.labels }}
          tags: |
            ${{ steps.meta.outputs.tags }}
            cyfershepard/jellystat:latest
            cyfershepard/jellystat:${{ env.VERSION }}
            ghcr.io/cyfershepard/jellystat:latest
            ghcr.io/cyfershepard/jellystat:${{ env.VERSION }}
          platforms: linux/amd64,linux/arm64,linux/arm/v7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants