docker / build-push-action

GitHub Action to build and push Docker images with Buildx
https://github.com/marketplace/actions/build-and-push-docker-images
Apache License 2.0
4.11k stars 527 forks source link

Merge Multi-Platform Image w/ Imagetools Create: Pull Access Denied #1033

Closed justinthelaw closed 6 months ago

justinthelaw commented 6 months ago

Contributing guidelines

I've found a bug, and:

Description

I am following the Docker multi-platform GitHub Actions instructions here, with the following modifications:

  1. The workflow triggers are now on push of a new tag (e.g. v0.1.0)
  2. The tags for included with each platform's digest include the ones recommended here
  3. I am building an image compatible with the following platforms:
    • linux/amd64
    • linux/arm64
    • linux/arm/v7
    • windows/amd64
  4. Probably most importantly: I am pushing to GHCR and not Docker Hub

I am able to get past the job where each platform build is matrixed into separate runners (example of completed job here). I noticed the interesting side-effect of these matrixed jobs pushing and overwriting the package's latest image to be the OS that last finished its job, as seen here, but that is not the purpose of this post.

Expected behaviour

The merge job (example job here) properly pulls down all digests and creates the multi-platform image manifest before pushing back into GHCR.

GHCR package repository then properly reflects support for all 4 OS/Arch combinations and contains the image with the tags: 0.1.0, latest

Actual behaviour

Ignoring the fact that I did not apply the v0.1.0 tag (that is inconsequential as I have already tried it and it does pick that up properly), the merge job gets up to "Create Manifest and Push Image" and fails at the following step, which occurs after GHCR login:

      - name: Create Manifest and Push Image
        working-directory: /tmp/digests
        run: |
          docker buildx imagetools create \
          -t ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} \
          $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)

The failure message is as follows: ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed. Please see the full log for details.

Repository URL

https://github.com/justinthelaw/gpu-support-test

Workflow run URL

https://github.com/justinthelaw/gpu-support-test/actions/runs/7401503898

YAML workflow

name: Build and Push Image

on:
  push:
    tags:
      - "v*.*.*"
  workflow_dispatch:

env:
  REGISTRY_IMAGE: justinthelaw/gpu-support-test
  REGISTRY: ghcr.io

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        platform:
          - linux/amd64
          - linux/arm64
          - linux/arm/v7
          - windows/amd64
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Docker Metadata
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: ${{ env.REGISTRY_IMAGE }}
          tags: |
            type=schedule
            type=ref,event=branch
            type=ref,event=pr
            type=semver,pattern={{version}}
            type=semver,pattern={{major}}.{{minor}}
            type=semver,pattern={{major}}
            type=sha
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3

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

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

      - name: Build and Push Digest
        id: build
        uses: docker/build-push-action@v5
        with:
          context: .
          platforms: ${{ matrix.platform }}
          labels: ${{ steps.meta.outputs.labels }}
          outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
          tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}

      - 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@v3
        with:
          name: digests
          path: /tmp/digests/*
          if-no-files-found: error
          retention-days: 1

  merge:
    runs-on: ubuntu-latest
    needs:
      - build
    steps:
      - name: Download Digests
        uses: actions/download-artifact@v3
        with:
          name: digests
          path: /tmp/digests

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

      - name: Docker Metadata
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: ${{ env.REGISTRY_IMAGE }}
          tags: |
            type=semver,pattern={{version}}
      - name: Login to GitHub Container Registry
        uses: docker/login-action@v3
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Create Manifest and Push Image
        working-directory: /tmp/digests
        run: |
          docker buildx imagetools create \
          -t ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} \
          $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
      - name: Inspect image
        run: |
          docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}

Workflow logs

The attached is the merge raw logs:

2024-01-03T19:28:07.3013370Z Requested labels: ubuntu-latest
2024-01-03T19:28:07.3013706Z Job defined at: justinthelaw/gpu-support-test/.github/workflows/build-and-push-image.yaml@refs/tags/v0.1.0
2024-01-03T19:28:07.3013837Z Waiting for a runner to pick up this job...
2024-01-03T19:28:08.0052223Z Job is waiting for a hosted runner to come online.
2024-01-03T19:28:12.3069693Z Job is about to start running on the hosted runner: GitHub Actions 2 (hosted)
2024-01-03T19:28:14.5476366Z Current runner version: '2.311.0'
2024-01-03T19:28:14.5507268Z ##[group]Operating System
2024-01-03T19:28:14.5507868Z Ubuntu
2024-01-03T19:28:14.5508311Z 22.04.3
2024-01-03T19:28:14.5508655Z LTS
2024-01-03T19:28:14.5508987Z ##[endgroup]
2024-01-03T19:28:14.5509431Z ##[group]Runner Image
2024-01-03T19:28:14.5509880Z Image: ubuntu-22.04
2024-01-03T19:28:14.5510280Z Version: 20231217.2.0
2024-01-03T19:28:14.5511299Z Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20231217.2/images/ubuntu/Ubuntu2204-Readme.md
2024-01-03T19:28:14.5512749Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20231217.2
2024-01-03T19:28:14.5513606Z ##[endgroup]
2024-01-03T19:28:14.5514084Z ##[group]Runner Image Provisioner
2024-01-03T19:28:14.5514535Z 2.0.321.1
2024-01-03T19:28:14.5514870Z ##[endgroup]
2024-01-03T19:28:14.5517079Z ##[group]GITHUB_TOKEN Permissions
2024-01-03T19:28:14.5518696Z Actions: write
2024-01-03T19:28:14.5519237Z Checks: write
2024-01-03T19:28:14.5519844Z Contents: write
2024-01-03T19:28:14.5520384Z Deployments: write
2024-01-03T19:28:14.5520776Z Discussions: write
2024-01-03T19:28:14.5521168Z Issues: write
2024-01-03T19:28:14.5521554Z Metadata: read
2024-01-03T19:28:14.5521926Z Packages: write
2024-01-03T19:28:14.5522314Z Pages: write
2024-01-03T19:28:14.5522750Z PullRequests: write
2024-01-03T19:28:14.5523348Z RepositoryProjects: write
2024-01-03T19:28:14.5523859Z SecurityEvents: write
2024-01-03T19:28:14.5524347Z Statuses: write
2024-01-03T19:28:14.5524799Z ##[endgroup]
2024-01-03T19:28:14.5527742Z Secret source: Actions
2024-01-03T19:28:14.5528441Z Prepare workflow directory
2024-01-03T19:28:14.6253062Z Prepare all required actions
2024-01-03T19:28:14.6408906Z Getting action download info
2024-01-03T19:28:14.9206966Z Download action repository 'actions/download-artifact@v3' (SHA:9bc31d5ccc31df68ecc42ccf4149144866c47d8a)
2024-01-03T19:28:15.4698920Z Download action repository 'docker/setup-buildx-action@v3' (SHA:f95db51fddba0c2d1ec667646a06c2ce06100226)
2024-01-03T19:28:15.9976608Z Download action repository 'docker/metadata-action@v5' (SHA:9dc751fe249ad99385a2583ee0d084c400eee04e)
2024-01-03T19:28:16.6007875Z Download action repository 'docker/login-action@v3' (SHA:343f7c4344506bcbf9b4de18042ae17996df046d)
2024-01-03T19:28:17.1841008Z Complete job name: merge
2024-01-03T19:28:17.2609575Z ##[group]Run actions/download-artifact@v3
2024-01-03T19:28:17.2609974Z with:
2024-01-03T19:28:17.2610194Z   name: digests
2024-01-03T19:28:17.2610447Z   path: /tmp/digests
2024-01-03T19:28:17.2610697Z env:
2024-01-03T19:28:17.2610956Z   REGISTRY_IMAGE: justinthelaw/gpu-support-test
2024-01-03T19:28:17.2611328Z   REGISTRY: ghcr.io
2024-01-03T19:28:17.2611584Z ##[endgroup]
2024-01-03T19:28:17.4137327Z Starting download for digests
2024-01-03T19:28:17.9869069Z Directory structure has been setup for the artifact
2024-01-03T19:28:17.9870259Z Total number of files that will be downloaded: 4
2024-01-03T19:28:18.2556890Z Skipping download validation.
2024-01-03T19:28:18.2979093Z Skipping download validation.
2024-01-03T19:28:18.5288267Z Skipping download validation.
2024-01-03T19:28:18.5985584Z Skipping download validation.
2024-01-03T19:28:18.5996211Z Artifact digests was downloaded to /tmp/digests
2024-01-03T19:28:18.6004822Z Artifact download has finished successfully
2024-01-03T19:28:18.6237117Z ##[group]Run docker/setup-buildx-action@v3
2024-01-03T19:28:18.6237504Z with:
2024-01-03T19:28:18.6237734Z   driver: docker-container
2024-01-03T19:28:18.6238334Z   buildkitd-flags: --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
2024-01-03T19:28:18.6238961Z   install: false
2024-01-03T19:28:18.6239190Z   use: true
2024-01-03T19:28:18.6239404Z   cleanup: true
2024-01-03T19:28:18.6239624Z env:
2024-01-03T19:28:18.6239906Z   REGISTRY_IMAGE: justinthelaw/gpu-support-test
2024-01-03T19:28:18.6240275Z   REGISTRY: ghcr.io
2024-01-03T19:28:18.6240513Z ##[endgroup]
2024-01-03T19:28:18.8725611Z ##[group]Docker info
2024-01-03T19:28:18.8743928Z [command]/usr/bin/docker version
2024-01-03T19:28:18.9654904Z Client: Docker Engine - Community
2024-01-03T19:28:18.9655509Z  Version:           24.0.7
2024-01-03T19:28:18.9656007Z  API version:       1.43
2024-01-03T19:28:18.9661152Z  Go version:        go1.20.10
2024-01-03T19:28:18.9662019Z  Git commit:        afdd53b
2024-01-03T19:28:18.9662547Z  Built:             Thu Oct 26 09:07:41 2023
2024-01-03T19:28:18.9663141Z  OS/Arch:           linux/amd64
2024-01-03T19:28:18.9663625Z  Context:           default
2024-01-03T19:28:18.9670350Z 
2024-01-03T19:28:18.9670698Z Server: Docker Engine - Community
2024-01-03T19:28:18.9671245Z  Engine:
2024-01-03T19:28:18.9671607Z   Version:          24.0.7
2024-01-03T19:28:18.9672124Z   API version:      1.43 (minimum version 1.12)
2024-01-03T19:28:18.9672703Z   Go version:       go1.20.10
2024-01-03T19:28:18.9673144Z   Git commit:       311b9ff
2024-01-03T19:28:18.9673472Z   Built:            Thu Oct 26 09:07:41 2023
2024-01-03T19:28:18.9675036Z   OS/Arch:          linux/amd64
2024-01-03T19:28:18.9675961Z   Experimental:     false
2024-01-03T19:28:18.9676617Z  containerd:
2024-01-03T19:28:18.9677016Z   Version:          1.6.26
2024-01-03T19:28:18.9677620Z   GitCommit:        3dd1e886e55dd695541fdcd67420c2888645a495
2024-01-03T19:28:18.9679452Z  runc:
2024-01-03T19:28:18.9680253Z   Version:          1.1.10
2024-01-03T19:28:18.9681195Z   GitCommit:        v1.1.10-0-g18a0cb0
2024-01-03T19:28:18.9682257Z  docker-init:
2024-01-03T19:28:18.9683245Z   Version:          0.19.0
2024-01-03T19:28:18.9684034Z   GitCommit:        de40ad0
2024-01-03T19:28:18.9703553Z [command]/usr/bin/docker info
2024-01-03T19:28:19.1485717Z Client: Docker Engine - Community
2024-01-03T19:28:19.1486304Z  Version:    24.0.7
2024-01-03T19:28:19.1486712Z  Context:    default
2024-01-03T19:28:19.1487138Z  Debug Mode: false
2024-01-03T19:28:19.1487550Z  Plugins:
2024-01-03T19:28:19.1487954Z   buildx: Docker Buildx (Docker Inc.)
2024-01-03T19:28:19.1488480Z     Version:  v0.11.2
2024-01-03T19:28:19.1489152Z     Path:     /usr/libexec/docker/cli-plugins/docker-buildx
2024-01-03T19:28:19.1489869Z   compose: Docker Compose (Docker Inc.)
2024-01-03T19:28:19.1490412Z     Version:  v2.23.3
2024-01-03T19:28:19.1491040Z     Path:     /usr/libexec/docker/cli-plugins/docker-compose
2024-01-03T19:28:19.1491547Z 
2024-01-03T19:28:19.1491692Z Server:
2024-01-03T19:28:19.1492035Z  Containers: 0
2024-01-03T19:28:19.1492263Z   Running: 0
2024-01-03T19:28:19.1492472Z   Paused: 0
2024-01-03T19:28:19.1492679Z   Stopped: 0
2024-01-03T19:28:19.1492897Z  Images: 16
2024-01-03T19:28:19.1493112Z  Server Version: 24.0.7
2024-01-03T19:28:19.1493399Z  Storage Driver: overlay2
2024-01-03T19:28:19.1493682Z   Backing Filesystem: extfs
2024-01-03T19:28:19.1494006Z   Supports d_type: true
2024-01-03T19:28:19.1494275Z   Using metacopy: false
2024-01-03T19:28:19.1494554Z   Native Overlay Diff: false
2024-01-03T19:28:19.1494840Z   userxattr: false
2024-01-03T19:28:19.1495120Z  Logging Driver: json-file
2024-01-03T19:28:19.1495414Z  Cgroup Driver: cgroupfs
2024-01-03T19:28:19.1495735Z  Cgroup Version: 2
2024-01-03T19:28:19.1495967Z  Plugins:
2024-01-03T19:28:19.1496180Z   Volume: local
2024-01-03T19:28:19.1496464Z   Network: bridge host ipvlan macvlan null overlay
2024-01-03T19:28:19.1497460Z   Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
2024-01-03T19:28:19.1497993Z  Swarm: inactive
2024-01-03T19:28:19.1498255Z  Runtimes: io.containerd.runc.v2 runc
2024-01-03T19:28:19.1498577Z  Default Runtime: runc
2024-01-03T19:28:19.1498872Z  Init Binary: docker-init
2024-01-03T19:28:19.1499246Z  containerd version: 3dd1e886e55dd695541fdcd67420c2888645a495
2024-01-03T19:28:19.1499701Z  runc version: v1.1.10-0-g18a0cb0
2024-01-03T19:28:19.1499998Z  init version: de40ad0
2024-01-03T19:28:19.1500254Z  Security Options:
2024-01-03T19:28:19.1500488Z   apparmor
2024-01-03T19:28:19.1500689Z   seccomp
2024-01-03T19:28:19.1500901Z    Profile: builtin
2024-01-03T19:28:19.1501144Z   cgroupns
2024-01-03T19:28:19.1501404Z  Kernel Version: 6.2.0-1018-azure
2024-01-03T19:28:19.1501915Z  Operating System: Ubuntu 22.04.3 LTS
2024-01-03T19:28:19.1502230Z  OSType: linux
2024-01-03T19:28:19.1502483Z  Architecture: x86_64
2024-01-03T19:28:19.1502729Z  CPUs: 4
2024-01-03T19:28:19.1502943Z  Total Memory: 15.61GiB
2024-01-03T19:28:19.1503245Z  Name: fv-az1429-131
2024-01-03T19:28:19.1503565Z  ID: 475e7ed5-e838-42ee-a486-2e6cf60dc459
2024-01-03T19:28:19.1503923Z  Docker Root Dir: /var/lib/docker
2024-01-03T19:28:19.1504222Z  Debug Mode: false
2024-01-03T19:28:19.1504470Z  Username: githubactions
2024-01-03T19:28:19.1504736Z  Experimental: false
2024-01-03T19:28:19.1504996Z  Insecure Registries:
2024-01-03T19:28:19.1505405Z   127.0.0.0/8
2024-01-03T19:28:19.1505818Z  Live Restore Enabled: false
2024-01-03T19:28:19.1506181Z 
2024-01-03T19:28:19.1511964Z ##[endgroup]
2024-01-03T19:28:19.2095288Z ##[group]Buildx version
2024-01-03T19:28:19.2118819Z [command]/usr/bin/docker buildx version
2024-01-03T19:28:19.2595464Z github.com/docker/buildx v0.11.2 9872040
2024-01-03T19:28:19.2624889Z ##[endgroup]
2024-01-03T19:28:19.2634254Z ##[group]Creating a new builder instance
2024-01-03T19:28:19.3270155Z [command]/usr/bin/docker buildx create --name builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c21 --driver docker-container --buildkitd-flags --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host --use
2024-01-03T19:28:19.3862071Z builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c21
2024-01-03T19:28:19.3890613Z ##[endgroup]
2024-01-03T19:28:19.3891392Z ##[group]Booting builder
2024-01-03T19:28:19.3938971Z [command]/usr/bin/docker buildx inspect --bootstrap --builder builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c21
2024-01-03T19:28:19.4511977Z #1 [internal] booting buildkit
2024-01-03T19:28:19.6019296Z #1 pulling image moby/buildkit:buildx-stable-1
2024-01-03T19:28:20.2024978Z #1 pulling image moby/buildkit:buildx-stable-1 0.8s done
2024-01-03T19:28:20.3528332Z #1 creating container buildx_buildkit_builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c210
2024-01-03T19:28:20.7573323Z #1 creating container buildx_buildkit_builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c210 0.6s done
2024-01-03T19:28:20.7604544Z #1 DONE 1.3s
2024-01-03T19:28:20.8364235Z Name:          builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c21
2024-01-03T19:28:20.8368965Z Driver:        docker-container
2024-01-03T19:28:20.8369700Z Last Activity: 2024-01-03 19:28:19 +0000 UTC
2024-01-03T19:28:20.8370142Z 
2024-01-03T19:28:20.8370285Z Nodes:
2024-01-03T19:28:20.8370866Z Name:      builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c210
2024-01-03T19:28:20.8371592Z Endpoint:  unix:///var/run/docker.sock
2024-01-03T19:28:20.8372141Z Status:    running
2024-01-03T19:28:20.8373183Z Flags:     --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
2024-01-03T19:28:20.8374202Z Buildkit:  v0.12.4
2024-01-03T19:28:20.8374826Z Platforms: linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/386
2024-01-03T19:28:20.8375550Z Labels:
2024-01-03T19:28:20.8376066Z  org.mobyproject.buildkit.worker.executor:         oci
2024-01-03T19:28:20.8376982Z  org.mobyproject.buildkit.worker.hostname:         107f2a19412e
2024-01-03T19:28:20.8377908Z  org.mobyproject.buildkit.worker.network:          host
2024-01-03T19:28:20.8378904Z  org.mobyproject.buildkit.worker.oci.process-mode: sandbox
2024-01-03T19:28:20.8380124Z  org.mobyproject.buildkit.worker.selinux.enabled:  false
2024-01-03T19:28:20.8381051Z  org.mobyproject.buildkit.worker.snapshotter:      overlayfs
2024-01-03T19:28:20.8381786Z GC Policy rule#0:
2024-01-03T19:28:20.8382169Z  All:           false
2024-01-03T19:28:20.8382879Z  Filters:       type==source.local,type==exec.cachemount,type==source.git.checkout
2024-01-03T19:28:20.8383733Z  Keep Duration: 48h0m0s
2024-01-03T19:28:20.8384189Z  Keep Bytes:    488.3MiB
2024-01-03T19:28:20.8384625Z GC Policy rule#1:
2024-01-03T19:28:20.8385020Z  All:           false
2024-01-03T19:28:20.8385436Z  Keep Duration: 1440h0m0s
2024-01-03T19:28:20.8385890Z  Keep Bytes:    8.382GiB
2024-01-03T19:28:20.8386325Z GC Policy rule#2:
2024-01-03T19:28:20.8386996Z  All:        false
2024-01-03T19:28:20.8387381Z  Keep Bytes: 8.382GiB
2024-01-03T19:28:20.8387792Z GC Policy rule#3:
2024-01-03T19:28:20.8388182Z  All:        true
2024-01-03T19:28:20.8388582Z  Keep Bytes: 8.382GiB
2024-01-03T19:28:20.8412411Z ##[endgroup]
2024-01-03T19:28:20.9596411Z ##[group]Inspect builder
2024-01-03T19:28:20.9657073Z {
2024-01-03T19:28:20.9657447Z   "nodes": [
2024-01-03T19:28:20.9657801Z     {
2024-01-03T19:28:20.9658400Z       "name": "builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c210",
2024-01-03T19:28:20.9658884Z       "endpoint": "unix:///var/run/docker.sock",
2024-01-03T19:28:20.9659262Z       "status": "running",
2024-01-03T19:28:20.9659956Z       "buildkitd-flags": "--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host",
2024-01-03T19:28:20.9660594Z       "buildkit": "v0.12.4",
2024-01-03T19:28:20.9661105Z       "platforms": "linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/386",
2024-01-03T19:28:20.9661630Z       "labels": {
2024-01-03T19:28:20.9662189Z         "org.mobyproject.buildkit.worker.executor": "oci",
2024-01-03T19:28:20.9662896Z         "org.mobyproject.buildkit.worker.hostname": "107f2a19412e",
2024-01-03T19:28:20.9663786Z         "org.mobyproject.buildkit.worker.network": "host",
2024-01-03T19:28:20.9664925Z         "org.mobyproject.buildkit.worker.oci.process-mode": "sandbox",
2024-01-03T19:28:20.9665811Z         "org.mobyproject.buildkit.worker.selinux.enabled": "false",
2024-01-03T19:28:20.9666648Z         "org.mobyproject.buildkit.worker.snapshotter": "overlayfs"
2024-01-03T19:28:20.9667217Z       },
2024-01-03T19:28:20.9667518Z       "gcPolicy": [
2024-01-03T19:28:20.9667840Z         {
2024-01-03T19:28:20.9668185Z           "all": false,
2024-01-03T19:28:20.9668545Z           "filter": [
2024-01-03T19:28:20.9668891Z             "type==source.local",
2024-01-03T19:28:20.9669373Z             "type==exec.cachemount",
2024-01-03T19:28:20.9669756Z             "type==source.git.checkout"
2024-01-03T19:28:20.9670171Z           ],
2024-01-03T19:28:20.9670561Z           "keepDuration": "48h0m0s",
2024-01-03T19:28:20.9670933Z           "keepBytes": "488.3MiB"
2024-01-03T19:28:20.9671325Z         },
2024-01-03T19:28:20.9671676Z         {
2024-01-03T19:28:20.9671973Z           "all": false,
2024-01-03T19:28:20.9672335Z           "keepDuration": "1440h0m0s",
2024-01-03T19:28:20.9672843Z           "keepBytes": "8.382GiB"
2024-01-03T19:28:20.9673219Z         },
2024-01-03T19:28:20.9673586Z         {
2024-01-03T19:28:20.9673880Z           "all": false,
2024-01-03T19:28:20.9674204Z           "keepBytes": "8.382GiB"
2024-01-03T19:28:20.9674630Z         },
2024-01-03T19:28:20.9674920Z         {
2024-01-03T19:28:20.9675193Z           "all": true,
2024-01-03T19:28:20.9675592Z           "keepBytes": "8.382GiB"
2024-01-03T19:28:20.9675954Z         }
2024-01-03T19:28:20.9676251Z       ]
2024-01-03T19:28:20.9676556Z     }
2024-01-03T19:28:20.9676849Z   ],
2024-01-03T19:28:20.9677315Z   "name": "builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c21",
2024-01-03T19:28:20.9677880Z   "driver": "docker-container",
2024-01-03T19:28:20.9678364Z   "lastActivity": "2024-01-03T19:28:19.000Z"
2024-01-03T19:28:20.9678773Z }
2024-01-03T19:28:20.9679366Z ##[endgroup]
2024-01-03T19:28:20.9679901Z ##[group]BuildKit version
2024-01-03T19:28:20.9680705Z builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c210: v0.12.4
2024-01-03T19:28:20.9681403Z ##[endgroup]
2024-01-03T19:28:20.9816080Z ##[group]Run docker/metadata-action@v5
2024-01-03T19:28:20.9816539Z with:
2024-01-03T19:28:20.9816954Z   images: justinthelaw/gpu-support-test
2024-01-03T19:28:20.9817449Z   tags: type=semver,pattern={{version}}

2024-01-03T19:28:20.9817892Z   context: workflow
2024-01-03T19:28:20.9818480Z   github-token: ***
2024-01-03T19:28:20.9818809Z env:
2024-01-03T19:28:20.9819142Z   REGISTRY_IMAGE: justinthelaw/gpu-support-test
2024-01-03T19:28:20.9819749Z   REGISTRY: ghcr.io
2024-01-03T19:28:20.9820084Z ##[endgroup]
2024-01-03T19:28:21.5287238Z ##[group]Context info
2024-01-03T19:28:21.5288113Z eventName: workflow_dispatch
2024-01-03T19:28:21.5289358Z sha: 4001482a5fe31d937655e6302da9a65114346149
2024-01-03T19:28:21.5290085Z ref: refs/tags/v0.1.0
2024-01-03T19:28:21.5290894Z workflow: Build and Push Image
2024-01-03T19:28:21.5291587Z action: meta
2024-01-03T19:28:21.5292287Z actor: justinthelaw
2024-01-03T19:28:21.5293058Z runNumber: 17
2024-01-03T19:28:21.5293634Z runId: 7401503898
2024-01-03T19:28:21.5294861Z ##[endgroup]
2024-01-03T19:28:21.5299987Z ##[group]Processing images input
2024-01-03T19:28:21.5301307Z name=justinthelaw/gpu-support-test,enable=true
2024-01-03T19:28:21.5302440Z ##[endgroup]
2024-01-03T19:28:21.5307758Z ##[group]Processing tags input
2024-01-03T19:28:21.5308678Z type=semver,pattern={{version}},value=,enable=true,priority=900
2024-01-03T19:28:21.5310178Z ##[endgroup]
2024-01-03T19:28:21.5311187Z ##[group]Processing flavor input
2024-01-03T19:28:21.5312024Z latest=auto
2024-01-03T19:28:21.5312493Z prefix=
2024-01-03T19:28:21.5313021Z prefixLatest=false
2024-01-03T19:28:21.5313730Z suffix=
2024-01-03T19:28:21.5314276Z suffixLatest=false
2024-01-03T19:28:21.5315265Z ##[endgroup]
2024-01-03T19:28:21.5368327Z ##[group]Docker image version
2024-01-03T19:28:21.5368949Z 0.1.0
2024-01-03T19:28:21.5369992Z ##[endgroup]
2024-01-03T19:28:21.5375602Z ##[group]Docker tags
2024-01-03T19:28:21.5376466Z justinthelaw/gpu-support-test:0.1.0
2024-01-03T19:28:21.5377275Z justinthelaw/gpu-support-test:latest
2024-01-03T19:28:21.5378315Z ##[endgroup]
2024-01-03T19:28:21.5541406Z ##[group]Docker labels
2024-01-03T19:28:21.5542324Z org.opencontainers.image.created=2024-01-03T19:28:21.531Z
2024-01-03T19:28:21.5543896Z org.opencontainers.image.description=GPU(s) pass-through testing for containerized environments
2024-01-03T19:28:21.5545254Z org.opencontainers.image.licenses=Apache-2.0
2024-01-03T19:28:21.5546230Z org.opencontainers.image.revision=4001482a5fe31d937655e6302da9a65114346149
2024-01-03T19:28:21.5547762Z org.opencontainers.image.source=https://github.com/justinthelaw/gpu-support-test
2024-01-03T19:28:21.5549026Z org.opencontainers.image.title=gpu-support-test
2024-01-03T19:28:21.5550232Z org.opencontainers.image.url=https://github.com/justinthelaw/gpu-support-test
2024-01-03T19:28:21.5551317Z org.opencontainers.image.version=0.1.0
2024-01-03T19:28:21.5552397Z ##[endgroup]
2024-01-03T19:28:21.5553401Z ##[group]Annotations
2024-01-03T19:28:21.5554245Z manifest:org.opencontainers.image.created=2024-01-03T19:28:21.531Z
2024-01-03T19:28:21.5555907Z manifest:org.opencontainers.image.description=GPU(s) pass-through testing for containerized environments
2024-01-03T19:28:21.5557366Z manifest:org.opencontainers.image.licenses=Apache-2.0
2024-01-03T19:28:21.5558526Z manifest:org.opencontainers.image.revision=4001482a5fe31d937655e6302da9a65114346149
2024-01-03T19:28:21.5560129Z manifest:org.opencontainers.image.source=https://github.com/justinthelaw/gpu-support-test
2024-01-03T19:28:21.5561576Z manifest:org.opencontainers.image.title=gpu-support-test
2024-01-03T19:28:21.5562880Z manifest:org.opencontainers.image.url=https://github.com/justinthelaw/gpu-support-test
2024-01-03T19:28:21.5564488Z manifest:org.opencontainers.image.version=0.1.0
2024-01-03T19:28:21.5565612Z ##[endgroup]
2024-01-03T19:28:21.5566549Z ##[group]JSON output
2024-01-03T19:28:21.5567093Z {
2024-01-03T19:28:21.5567484Z   "tags": [
2024-01-03T19:28:21.5568225Z     "justinthelaw/gpu-support-test:0.1.0",
2024-01-03T19:28:21.5569396Z     "justinthelaw/gpu-support-test:latest"
2024-01-03T19:28:21.5570179Z   ],
2024-01-03T19:28:21.5570604Z   "labels": {
2024-01-03T19:28:21.5571421Z     "org.opencontainers.image.created": "2024-01-03T19:28:21.531Z",
2024-01-03T19:28:21.5573033Z     "org.opencontainers.image.description": "GPU(s) pass-through testing for containerized environments",
2024-01-03T19:28:21.5574440Z     "org.opencontainers.image.licenses": "Apache-2.0",
2024-01-03T19:28:21.5575485Z     "org.opencontainers.image.revision": "4001482a5fe31d937655e6302da9a65114346149",
2024-01-03T19:28:21.5577108Z     "org.opencontainers.image.source": "https://github.com/justinthelaw/gpu-support-test",
2024-01-03T19:28:21.5578628Z     "org.opencontainers.image.title": "gpu-support-test",
2024-01-03T19:28:21.5579911Z     "org.opencontainers.image.url": "https://github.com/justinthelaw/gpu-support-test",
2024-01-03T19:28:21.5581066Z     "org.opencontainers.image.version": "0.1.0"
2024-01-03T19:28:21.5581773Z   },
2024-01-03T19:28:21.5582255Z   "annotations": [
2024-01-03T19:28:21.5583225Z     "manifest:org.opencontainers.image.created=2024-01-03T19:28:21.531Z",
2024-01-03T19:28:21.5584768Z     "manifest:org.opencontainers.image.description=GPU(s) pass-through testing for containerized environments",
2024-01-03T19:28:21.5586241Z     "manifest:org.opencontainers.image.licenses=Apache-2.0",
2024-01-03T19:28:21.5587519Z     "manifest:org.opencontainers.image.revision=4001482a5fe31d937655e6302da9a65114346149",
2024-01-03T19:28:21.5589093Z     "manifest:org.opencontainers.image.source=https://github.com/justinthelaw/gpu-support-test",
2024-01-03T19:28:21.5590441Z     "manifest:org.opencontainers.image.title=gpu-support-test",
2024-01-03T19:28:21.5591919Z     "manifest:org.opencontainers.image.url=https://github.com/justinthelaw/gpu-support-test",
2024-01-03T19:28:21.5593116Z     "manifest:org.opencontainers.image.version=0.1.0"
2024-01-03T19:28:21.5593825Z   ]
2024-01-03T19:28:21.5594304Z }
2024-01-03T19:28:21.5595172Z ##[endgroup]
2024-01-03T19:28:21.5596266Z ##[group]Bake file definition (tags)
2024-01-03T19:28:21.5596896Z {
2024-01-03T19:28:21.5597328Z   "target": {
2024-01-03T19:28:21.5598001Z     "docker-metadata-action": {
2024-01-03T19:28:21.5598569Z       "tags": [
2024-01-03T19:28:21.5599202Z         "justinthelaw/gpu-support-test:0.1.0",
2024-01-03T19:28:21.5600144Z         "justinthelaw/gpu-support-test:latest"
2024-01-03T19:28:21.5600813Z       ],
2024-01-03T19:28:21.5601202Z       "args": {
2024-01-03T19:28:21.5602116Z         "DOCKER_META_IMAGES": "justinthelaw/gpu-support-test",
2024-01-03T19:28:21.5602923Z         "DOCKER_META_VERSION": "0.1.0"
2024-01-03T19:28:21.5603660Z       }
2024-01-03T19:28:21.5604217Z     }
2024-01-03T19:28:21.5604647Z   }
2024-01-03T19:28:21.5605149Z }
2024-01-03T19:28:21.5605965Z ##[endgroup]
2024-01-03T19:28:21.5606914Z ##[group]Bake file definition (labels)
2024-01-03T19:28:21.5607545Z {
2024-01-03T19:28:21.5607933Z   "target": {
2024-01-03T19:28:21.5608634Z     "docker-metadata-action": {
2024-01-03T19:28:21.5609257Z       "labels": {
2024-01-03T19:28:21.5610085Z         "org.opencontainers.image.created": "2024-01-03T19:28:21.531Z",
2024-01-03T19:28:21.5611645Z         "org.opencontainers.image.description": "GPU(s) pass-through testing for containerized environments",
2024-01-03T19:28:21.5613042Z         "org.opencontainers.image.licenses": "Apache-2.0",
2024-01-03T19:28:21.5614120Z         "org.opencontainers.image.revision": "4001482a5fe31d937655e6302da9a65114346149",
2024-01-03T19:28:21.5615734Z         "org.opencontainers.image.source": "https://github.com/justinthelaw/gpu-support-test",
2024-01-03T19:28:21.5616961Z         "org.opencontainers.image.title": "gpu-support-test",
2024-01-03T19:28:21.5618269Z         "org.opencontainers.image.url": "https://github.com/justinthelaw/gpu-support-test",
2024-01-03T19:28:21.5619481Z         "org.opencontainers.image.version": "0.1.0"
2024-01-03T19:28:21.5620164Z       }
2024-01-03T19:28:21.5620570Z     }
2024-01-03T19:28:21.5621109Z   }
2024-01-03T19:28:21.5621528Z }
2024-01-03T19:28:21.5622619Z ##[endgroup]
2024-01-03T19:28:21.5623528Z ##[group]Bake file definition (annotations)
2024-01-03T19:28:21.5624183Z {
2024-01-03T19:28:21.5624686Z   "target": {
2024-01-03T19:28:21.5625301Z     "docker-metadata-action": {
2024-01-03T19:28:21.5625898Z       "annotations": [
2024-01-03T19:28:21.5626888Z         "manifest:org.opencontainers.image.created=2024-01-03T19:28:21.531Z",
2024-01-03T19:28:21.5628536Z         "manifest:org.opencontainers.image.description=GPU(s) pass-through testing for containerized environments",
2024-01-03T19:28:21.5630043Z         "manifest:org.opencontainers.image.licenses=Apache-2.0",
2024-01-03T19:28:21.5631596Z         "manifest:org.opencontainers.image.revision=4001482a5fe31d937655e6302da9a65114346149",
2024-01-03T19:28:21.5633204Z         "manifest:org.opencontainers.image.source=https://github.com/justinthelaw/gpu-support-test",
2024-01-03T19:28:21.5634544Z         "manifest:org.opencontainers.image.title=gpu-support-test",
2024-01-03T19:28:21.5636032Z         "manifest:org.opencontainers.image.url=https://github.com/justinthelaw/gpu-support-test",
2024-01-03T19:28:21.5637225Z         "manifest:org.opencontainers.image.version=0.1.0"
2024-01-03T19:28:21.5638067Z       ]
2024-01-03T19:28:21.5638463Z     }
2024-01-03T19:28:21.5638892Z   }
2024-01-03T19:28:21.5639437Z }
2024-01-03T19:28:21.5640276Z ##[endgroup]
2024-01-03T19:28:21.6111105Z ##[group]Run docker/login-action@v3
2024-01-03T19:28:21.6111904Z with:
2024-01-03T19:28:21.6112376Z   registry: ghcr.io
2024-01-03T19:28:21.6112901Z   username: justinthelaw
2024-01-03T19:28:21.6113898Z   password: ***
2024-01-03T19:28:21.6114357Z   ecr: auto
2024-01-03T19:28:21.6114679Z   logout: true
2024-01-03T19:28:21.6115293Z env:
2024-01-03T19:28:21.6115836Z   REGISTRY_IMAGE: justinthelaw/gpu-support-test
2024-01-03T19:28:21.6116509Z   REGISTRY: ghcr.io
2024-01-03T19:28:21.6117189Z   DOCKER_METADATA_OUTPUT_VERSION: 0.1.0
2024-01-03T19:28:21.6118340Z   DOCKER_METADATA_OUTPUT_TAGS: justinthelaw/gpu-support-test:0.1.0
justinthelaw/gpu-support-test:latest
2024-01-03T19:28:21.6123707Z   DOCKER_METADATA_OUTPUT_LABELS: org.opencontainers.image.created=2024-01-03T19:28:21.531Z
org.opencontainers.image.description=GPU(s) pass-through testing for containerized environments
org.opencontainers.image.licenses=Apache-2.0
org.opencontainers.image.revision=4001482a5fe31d937655e6302da9a65114346149
org.opencontainers.image.source=https://github.com/justinthelaw/gpu-support-test
org.opencontainers.image.title=gpu-support-test
org.opencontainers.image.url=https://github.com/justinthelaw/gpu-support-test
org.opencontainers.image.version=0.1.0
2024-01-03T19:28:21.6131707Z   DOCKER_METADATA_OUTPUT_ANNOTATIONS: manifest:org.opencontainers.image.created=2024-01-03T19:28:21.531Z
manifest:org.opencontainers.image.description=GPU(s) pass-through testing for containerized environments
manifest:org.opencontainers.image.licenses=Apache-2.0
manifest:org.opencontainers.image.revision=4001482a5fe31d937655e6302da9a65114346149
manifest:org.opencontainers.image.source=https://github.com/justinthelaw/gpu-support-test
manifest:org.opencontainers.image.title=gpu-support-test
manifest:org.opencontainers.image.url=https://github.com/justinthelaw/gpu-support-test
manifest:org.opencontainers.image.version=0.1.0
2024-01-03T19:28:21.6145688Z   DOCKER_METADATA_OUTPUT_JSON: {"tags":["justinthelaw/gpu-support-test:0.1.0","justinthelaw/gpu-support-test:latest"],"labels":{"org.opencontainers.image.created":"2024-01-03T19:28:21.531Z","org.opencontainers.image.description":"GPU(s) pass-through testing for containerized environments","org.opencontainers.image.licenses":"Apache-2.0","org.opencontainers.image.revision":"4001482a5fe31d937655e6302da9a65114346149","org.opencontainers.image.source":"https://github.com/justinthelaw/gpu-support-test","org.opencontainers.image.title":"gpu-support-test","org.opencontainers.image.url":"https://github.com/justinthelaw/gpu-support-test","org.opencontainers.image.version":"0.1.0"},"annotations":["manifest:org.opencontainers.image.created=2024-01-03T19:28:21.531Z","manifest:org.opencontainers.image.description=GPU(s) pass-through testing for containerized environments","manifest:org.opencontainers.image.licenses=Apache-2.0","manifest:org.opencontainers.image.revision=4001482a5fe31d937655e6302da9a65114346149","manifest:org.opencontainers.image.source=https://github.com/justinthelaw/gpu-support-test","manifest:org.opencontainers.image.title=gpu-support-test","manifest:org.opencontainers.image.url=https://github.com/justinthelaw/gpu-support-test","manifest:org.opencontainers.image.version=0.1.0"]}
2024-01-03T19:28:21.6156333Z   DOCKER_METADATA_OUTPUT_BAKE_FILE_TAGS: /home/runner/work/_temp/docker-actions-toolkit-TvXzh3/docker-metadata-action-bake-tags.json
2024-01-03T19:28:21.6158732Z   DOCKER_METADATA_OUTPUT_BAKE_FILE_LABELS: /home/runner/work/_temp/docker-actions-toolkit-TvXzh3/docker-metadata-action-bake-labels.json
2024-01-03T19:28:21.6160644Z   DOCKER_METADATA_OUTPUT_BAKE_FILE_ANNOTATIONS: /home/runner/work/_temp/docker-actions-toolkit-TvXzh3/docker-metadata-action-bake-annotations.json
2024-01-03T19:28:21.6162841Z   DOCKER_METADATA_OUTPUT_BAKE_FILE: /home/runner/work/_temp/docker-actions-toolkit-TvXzh3/docker-metadata-action-bake.json
2024-01-03T19:28:21.6164708Z ##[endgroup]
2024-01-03T19:28:21.7213934Z Logging into ghcr.io...
2024-01-03T19:28:22.2130599Z Login Succeeded!
2024-01-03T19:28:22.2289270Z ##[group]Run docker buildx imagetools create \
2024-01-03T19:28:22.2289811Z docker buildx imagetools create \
2024-01-03T19:28:22.2290399Z -t ghcr.io/justinthelaw/gpu-support-test:0.1.0 \
2024-01-03T19:28:22.2291109Z $(printf 'justinthelaw/gpu-support-test@sha256:%s ' *)
2024-01-03T19:28:22.2355566Z shell: /usr/bin/bash -e {0}
2024-01-03T19:28:22.2355937Z env:
2024-01-03T19:28:22.2356333Z   REGISTRY_IMAGE: justinthelaw/gpu-support-test
2024-01-03T19:28:22.2356911Z   REGISTRY: ghcr.io
2024-01-03T19:28:22.2357304Z   DOCKER_METADATA_OUTPUT_VERSION: 0.1.0
2024-01-03T19:28:22.2357969Z   DOCKER_METADATA_OUTPUT_TAGS: justinthelaw/gpu-support-test:0.1.0
justinthelaw/gpu-support-test:latest
2024-01-03T19:28:22.2361066Z   DOCKER_METADATA_OUTPUT_LABELS: org.opencontainers.image.created=2024-01-03T19:28:21.531Z
org.opencontainers.image.description=GPU(s) pass-through testing for containerized environments
org.opencontainers.image.licenses=Apache-2.0
org.opencontainers.image.revision=4001482a5fe31d937655e6302da9a65114346149
org.opencontainers.image.source=https://github.com/justinthelaw/gpu-support-test
org.opencontainers.image.title=gpu-support-test
org.opencontainers.image.url=https://github.com/justinthelaw/gpu-support-test
org.opencontainers.image.version=0.1.0
2024-01-03T19:28:22.2366889Z   DOCKER_METADATA_OUTPUT_ANNOTATIONS: manifest:org.opencontainers.image.created=2024-01-03T19:28:21.531Z
manifest:org.opencontainers.image.description=GPU(s) pass-through testing for containerized environments
manifest:org.opencontainers.image.licenses=Apache-2.0
manifest:org.opencontainers.image.revision=4001482a5fe31d937655e6302da9a65114346149
manifest:org.opencontainers.image.source=https://github.com/justinthelaw/gpu-support-test
manifest:org.opencontainers.image.title=gpu-support-test
manifest:org.opencontainers.image.url=https://github.com/justinthelaw/gpu-support-test
manifest:org.opencontainers.image.version=0.1.0
2024-01-03T19:28:22.2374906Z   DOCKER_METADATA_OUTPUT_JSON: {"tags":["justinthelaw/gpu-support-test:0.1.0","justinthelaw/gpu-support-test:latest"],"labels":{"org.opencontainers.image.created":"2024-01-03T19:28:21.531Z","org.opencontainers.image.description":"GPU(s) pass-through testing for containerized environments","org.opencontainers.image.licenses":"Apache-2.0","org.opencontainers.image.revision":"4001482a5fe31d937655e6302da9a65114346149","org.opencontainers.image.source":"https://github.com/justinthelaw/gpu-support-test","org.opencontainers.image.title":"gpu-support-test","org.opencontainers.image.url":"https://github.com/justinthelaw/gpu-support-test","org.opencontainers.image.version":"0.1.0"},"annotations":["manifest:org.opencontainers.image.created=2024-01-03T19:28:21.531Z","manifest:org.opencontainers.image.description=GPU(s) pass-through testing for containerized environments","manifest:org.opencontainers.image.licenses=Apache-2.0","manifest:org.opencontainers.image.revision=4001482a5fe31d937655e6302da9a65114346149","manifest:org.opencontainers.image.source=https://github.com/justinthelaw/gpu-support-test","manifest:org.opencontainers.image.title=gpu-support-test","manifest:org.opencontainers.image.url=https://github.com/justinthelaw/gpu-support-test","manifest:org.opencontainers.image.version=0.1.0"]}
2024-01-03T19:28:22.2381259Z   DOCKER_METADATA_OUTPUT_BAKE_FILE_TAGS: /home/runner/work/_temp/docker-actions-toolkit-TvXzh3/docker-metadata-action-bake-tags.json
2024-01-03T19:28:22.2382722Z   DOCKER_METADATA_OUTPUT_BAKE_FILE_LABELS: /home/runner/work/_temp/docker-actions-toolkit-TvXzh3/docker-metadata-action-bake-labels.json
2024-01-03T19:28:22.2384057Z   DOCKER_METADATA_OUTPUT_BAKE_FILE_ANNOTATIONS: /home/runner/work/_temp/docker-actions-toolkit-TvXzh3/docker-metadata-action-bake-annotations.json
2024-01-03T19:28:22.2385377Z   DOCKER_METADATA_OUTPUT_BAKE_FILE: /home/runner/work/_temp/docker-actions-toolkit-TvXzh3/docker-metadata-action-bake.json
2024-01-03T19:28:22.2386104Z ##[endgroup]
2024-01-03T19:28:23.1803632Z ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
2024-01-03T19:28:23.1849249Z ##[error]Process completed with exit code 1.
2024-01-03T19:28:23.1914245Z Post job cleanup.
2024-01-03T19:28:23.2925259Z [command]/usr/bin/docker logout ghcr.io
2024-01-03T19:28:23.3048299Z Removing login credentials for ghcr.io
2024-01-03T19:28:23.3182416Z Post job cleanup.
2024-01-03T19:28:23.4590617Z ##[group]Removing builder
2024-01-03T19:28:23.5833832Z [command]/usr/bin/docker buildx rm builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c21
2024-01-03T19:28:23.7850844Z builder-9e1a17e2-a4f0-4dc3-9cdd-216876154c21 removed
2024-01-03T19:28:23.7881684Z ##[endgroup]
2024-01-03T19:28:23.7882757Z ##[group]Cleaning up certificates
2024-01-03T19:28:23.7889568Z ##[endgroup]
2024-01-03T19:28:23.8092169Z Cleaning up orphan processes

BuildKit logs

N/A, please let me know if these are needed.

Additional info

I am able to run the example commands below without problems locally, so it is not my Dockerfile nor Docker buildx. The commands properly push a multi-platform image to the package repository.

# create buildx instance
docker buildx install
# BUILDX_INSTANCE=multi-platform
docker buildx create --use --name ${BUILDX_INSTANCE}

# login to ghcr
docker login ghcr.io

# build and push multi-platform image
docker buildx build --push \
# REGISTRY=ghcr.io/justinthelaw/gpu-support-test
--build-arg REGISTRY=${REGISTRY}  \
# VERSION=0.0.1
--build-arg VERSION=${VERSION} \
--platform linux/386,windows/amd64,windows/arm64,linux/arm/v7,linux/arm/v6,linux/arm/v5,linux/arm64,linux/ppc64ie,linux/s390x,linux/amd64,linux/amd64/v2,linux/amd64/v3 \
-t ${REGISTRY}:${VERSION} .

# remove buildx instance
# BUILDX_INSTANCE=multi-platform
docker buildx rm ${BUILDX_INSTANCE}
crazy-max commented 6 months ago

This command does not look right: https://github.com/justinthelaw/gpu-support-test/actions/runs/7401503898/job/20137548820#step:6:2

      - name: Create Manifest and Push Image
        working-directory: /tmp/digests
        run: |
          docker buildx imagetools create \
          -t ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} \
          $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)

image

Should be something like:

      - name: Create Manifest and Push Image
        working-directory: /tmp/digests
        run: |
          docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
            $(printf '${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
justinthelaw commented 6 months ago

I had a variation of that originally and it gave me a reference error. I'll try your code later today and report on the logs or success. Thank you!

justinthelaw commented 6 months ago

@crazy-max I was able to diagnose and fix the problem! The final YAML file looks like the one below, and the run is here.

It turns out, I needed to add the env.REGISTRY to both the area you specified, and also in the Docker Metadata step. Originally, the Docker Metadata step only included env.REGISTRY_IMAGE

name: Build and Push Image

on:
  push:
    tags:
      - "v*.*.*"
  workflow_dispatch:

env:
  REGISTRY_IMAGE: justinthelaw/gpu-support-test
  REGISTRY: ghcr.io

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        platform:
          - linux/amd64
          - linux/arm64
          - linux/arm/v7
          - windows/amd64
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Docker Metadata
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: ${{ env.REGISTRY_IMAGE }}
          tags: |
            type=schedule
            type=ref,event=branch
            type=ref,event=pr
            type=semver,pattern={{version}}
            type=semver,pattern={{major}}.{{minor}}
            type=semver,pattern={{major}}
            type=sha
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3

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

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

      - name: Build and Push Digest
        id: build
        uses: docker/build-push-action@v5
        with:
          context: .
          platforms: ${{ matrix.platform }}
          labels: ${{ steps.meta.outputs.labels }}
          outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
          tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}

      - 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@v3
        with:
          name: digests
          path: /tmp/digests/*
          if-no-files-found: error
          retention-days: 1

  merge:
    runs-on: ubuntu-latest
    needs:
      - build
    steps:
      - name: Download Digests
        uses: actions/download-artifact@v3
        with:
          name: digests
          path: /tmp/digests

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

      - name: Docker Metadata
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}
          tags: |
            type=schedule
            type=ref,event=branch
            type=ref,event=pr
            type=semver,pattern={{version}}
            type=semver,pattern={{major}}.{{minor}}
            type=semver,pattern={{major}}
            type=sha      
      - name: Login to GitHub Container Registry
        uses: docker/login-action@v3
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Create Manifest and Push Image
        working-directory: /tmp/digests
        run: |
          docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
            $(printf '${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)

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