Skip to content

BuildX: Missing package description / untagged Images at build with Platform: xy parameter  #447

@alexanderwwagner

Description

@alexanderwwagner

Behaviour

If I push my docker image with an action workflow to github packages, then I can find my docker image in the package chapter
of my desired repository.

  • Aside from that my currently pushed docker image is tagged with the right tag (latest and Release version):
    image

  • Additional I can find the right description of the docker image:
    image

Problem:
I need my docker Image for multiple architecture available.
Because of that I insert the line: platforms: linux/amd64,linux/arm64,linux/arm/v7 in my workflow file.
The push to the github package registry works fine with this, but I have this two problems:

  • Missing docker description after push with this parameter
    image

  • At each push there I can find my new docker Image with the right tag (latest and Release version), but there are additional three untagged Images pushed
    image

image

Expected behaviour

If I use the platform parameter there should still be a description for my docker image.
There should not be untagged docker images after push with the platform parameter.

Thank you for your response!

My workflow.yml

name: Build/Update Docker Image

on:
  release:
      types: # This configuration does not affect the page_build event above
        - published

  #pull_request:
  #  branches: [ main ]
env:
  REGISTRY: ghcr.io
  IMAGE_NAME: ${{ github.repository }}

jobs:

  build-and-push-image:

    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
    # Checkout repository
    - name: Checkout repository
      uses: actions/checkout@v2
    
    # Login to Docker registry
    - name: Login to GitHub Container Registry
      uses: docker/login-action@v1
      with:
        registry: ghcr.io
        username: ${{ github.actor }}
        password: ${{ secrets.GITHUB_TOKEN }}
    
    
    # Extract metadata for Docker
    - name: Extract metadata (tags, labels) for Docker
      id: meta
      uses: docker/metadata-action@v3
      with:
        images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
    
    
    # https://github.com/docker/setup-qemu-action
    - name: Set up QEMU
      uses: docker/setup-qemu-action@v1
    
    
    # Setup buildx
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v1
      
      
    # Available platforms  
    - name: Available platforms
      run: echo ${{ steps.buildx.outputs.platforms }}
    
    
    # Get Tag version
    - name: Get Tag Version
      run: |
        echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
        echo $RELEASE_VERSION
        echo ${{ env.RELEASE_VERSION }}
    
    
    # Build and push Docker image
    - name: Build and push Docker image
      uses: docker/build-push-action@v2
      with:
        context: .
        platforms: linux/amd64,linux/arm64,linux/arm/v7
        push: true
        tags: ${{ steps.meta.outputs.tags }}
        labels: ${{ steps.meta.outputs.labels }}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions