build-push-action: Errors while building such as "`ERROR: failed to parse source "conversions\"", valid sources are digests, references and descriptors: invalid reference format`"

Contributing guidelines

I’ve found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

I recently did a few changes to https://github.com/unoconv/unoserver-docker such as as:

  • upgrade action from v5 and v6
  • upgrade eclipse-temurin
  • upgrade pip package unoserver

I think I have reverted all changes but the upgrade of build-push-action but still get errors in the workflow:

  1. ERROR: failed to parse source “LibreOffice”, valid sources are digests, references and descriptors: invalid reference format: repository name (library/LibreOffice) must be lowercase
  2. ERROR: “failed to parse source “conversions"”, valid sources are digests, references and descriptors: invalid reference format” possibly after upgrading

The LibreOffice seems be related to this:

outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,annotation-index.org.opencontainers.image.description=Container image that contains unoserver and LibreOffice incl a large set of fonts for file format conversions

That is, “LibreOffice” in the description! I removed that and error 1 goes away.

However, I’m unable to figure out error #2 regarding conversions.

Any ideas on what can be causing this error, this worked before (to my knowledge) and I’ve used the github example from the official docker manual.

Expected behaviour

The build is successful generating two images.

Actual behaviour

The build fails during Create manifest list and push with:

ERROR: failed to parse source "conversions\"", valid sources are digests, references and descriptors: invalid reference format

Repository URL

https://github.com/unoconv/unoserver-docker

Workflow run URL

https://github.com/unoconv/unoserver-docker/blob/main/.github/workflows/publish-containers.yml

YAML workflow

name: Publish container image to GHCR

on:
  release:
    types:
      - created

env:
  REGISTRY: ghcr.io
  IMAGE_NAME: ${{ github.repository }}

jobs:
  build-n-push-digest:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
      id-token: write

    strategy:
      fail-fast: false
      matrix:
        platform:
          - linux/arm64
          - linux/amd64

    steps:
      - name: Prepare
        run: |
          platform=${{ matrix.platform }}
          echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV

      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Extract container metadata
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
          tags: |
            type=schedule
            type=ref,event=branch
            type=ref,event=pr
            type=semver,pattern={{version}}
        env:
          DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3

      - name: Setup Docker buildx
        uses: docker/setup-buildx-action@v3

      - name: Login to image registry ${{ env.REGISTRY }}
        uses: docker/login-action@v3
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Build and push by digest
        id: build
        uses: docker/build-push-action@v6
        with:
          context: .
          push: true
          platforms: ${{ matrix.platform }}
          labels: ${{ steps.meta.outputs.labels }}
          annotations: ${{ steps.meta.outputs.annotations }}
          provenance: mode=max
          sbom: true
          outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,annotation-index.org.opencontainers.image.description=Container image that contains unoserver and libreoffice incl a large set of fonts for file format conversions
        env:
          DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index

      - name: Export digest
        run: |
          mkdir -p /tmp/digests
          digest="${{ steps.build.outputs.digest }}"
          touch "/tmp/digests/${digest#sha256:}"

      - name: Upload digest
        uses: actions/upload-artifact@v4
        with:
          name: digests-${{ env.PLATFORM_PAIR }}
          path: /tmp/digests/*
          if-no-files-found: error
          retention-days: 1

  merge:
    runs-on: ubuntu-latest
    needs:
      - build-n-push-digest
    steps:
      - name: Download digests
        uses: actions/download-artifact@v4
        with:
          path: /tmp/digests
          pattern: digests-*
          merge-multiple: true

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
          tags: |
            type=schedule
            type=ref,event=branch
            type=ref,event=pr
            type=semver,pattern={{version}}
          annotations: |
            org.opencontainers.image.description=Container image that contains unoserver and libreoffice including large set of fonts for file format conversions
            org.opencontainers.image.licenses=MIT
            org.opencontainers.image.source=https://github.com/unoconv/unoserver-docker
        env:
          DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index

      - name: Login to image registry ${{ env.REGISTRY }}
        uses: docker/login-action@v3
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Debug info 1
        working-directory: /tmp/digests
        run: ls -la

      - name: Debug info 2
        working-directory: /tmp/digests
        run: |
          echo "Listing files in the directory and outputting their contents:"

          # Define the directory path
          DIRECTORY_PATH=.

          # List files in the directory and save to file_list.txt
          ls -la $DIRECTORY_PATH > file_list.txt

          # Output content of each file and save to output.txt
          for file in $(ls $DIRECTORY_PATH); do
            echo "Contents of $DIRECTORY_PATH/$file:" >> output.txt
            echo "$DIRECTORY_PATH/$file:" >> output.txt
            cat $DIRECTORY_PATH/$file >> output.txt
            echo "\n\n" >> output.txt
          done

      - name: Create manifest list and push
        working-directory: /tmp/digests
        run: |
          docker buildx imagetools create \
            $(echo $DOCKER_METADATA_OUTPUT_JSON | jq -cr '.tags | map("-t " + .) | join(" ")') \
            $(echo $DOCKER_METADATA_OUTPUT_JSON | jq -r '.annotations | map("--annotation \"" + . + "\"") | join(" ")') \
            $(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)

      - name: Inspect image
        run: |
          docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
yaml

Workflow logs

logs_26787841608.zip

BuildKit logs

Post job cleanup.
BuildKit container logs
  /usr/bin/docker logs buildx_buildkit_builder-7a5587eb-1e2a-4771-9d78-eb611f6bbc570
  time="2024-08-05T00:10:12Z" level=info msg="auto snapshotter: using overlayfs"
  time="2024-08-05T00:10:12Z" level=warning msg="using host network as the default"
  time="2024-08-05T00:10:12Z" level=info msg="found worker \"kzyb9ltwy9wmxjvqg0injjsyb\", labels=map[org.mobyproject.buildkit.worker.executor:oci org.mobyproject.buildkit.worker.hostname:5cfb69ae1535 org.mobyproject.buildkit.worker.network:host org.mobyproject.buildkit.worker.oci.process-mode:sandbox org.mobyproject.buildkit.worker.selinux.enabled:false org.mobyproject.buildkit.worker.snapshotter:overlayfs], platforms=[linux/amd64 linux/amd64/v2 linux/amd64/v3 linux/386]"
  time="2024-08-05T00:10:12Z" level=warning msg="skipping containerd worker, as \"/run/containerd/containerd.sock\" does not exist"
  time="2024-08-05T00:10:12Z" level=info msg="found 1 workers, default=\"kzyb9ltwy9wmxjvqg0injjsyb\""
  time="2024-08-05T00:10:12Z" level=warning msg="currently, only the default worker can be used."
  time="2024-08-05T00:10:12Z" level=info msg="running server on /run/buildkit/buildkitd.sock"
Removing builder
Cleaning up certificates
Post cache


### Additional info

_No response_

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

Sorry for the delay, I’m looking at it asap.