From 310246f411e6faa7018f9d3c6cc45f08e9115b6a Mon Sep 17 00:00:00 2001 From: Rene Gassmoeller Date: Wed, 10 Jul 2024 14:44:05 +0200 Subject: [PATCH] Push to ghcr.io first --- .github/workflows/docker.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6ed28bed48..30cc4f7d8a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -74,7 +74,7 @@ jobs: platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} push: ${{ github.event_name == 'schedule' }} - outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true + outputs: type=image,name=ghcr.io/${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true - name: Export digest run: | @@ -118,7 +118,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY_IMAGE }} + images: ghcr.io/${{ env.REGISTRY_IMAGE }} - name: Login to Docker Hub uses: docker/login-action@v3 @@ -133,13 +133,17 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Create manifest list and push + - name: Create manifest list and push to ghcr.io working-directory: /tmp/digests run: | - docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:master-${{ matrix.ubuntu_version }} \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) docker buildx imagetools create -t ghcr.io/${{ env.REGISTRY_IMAGE }}:master-${{ matrix.ubuntu_version }} \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + $(printf 'ghcr.io/${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + + - name: Create manifest list and push to DockerHub + working-directory: /tmp/digests + run: | + docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:master-${{ matrix.ubuntu_version }} \ + $(printf 'ghcr.io/${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) - name: Inspect image run: | -- 2.39.5