From 437f3bd84aeb1602cd1e1dbfbcec7ec302be0c89 Mon Sep 17 00:00:00 2001 From: Ionut Balutoiu Date: Tue, 5 Dec 2023 17:06:55 +0200 Subject: [PATCH] Update `.github/workflows/docker-buildx.yaml` Remove `manifest_from_image` logic, since this is not needed anymore. Signed-off-by: Ionut Balutoiu --- .github/workflows/docker-buildx.yaml | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/.github/workflows/docker-buildx.yaml b/.github/workflows/docker-buildx.yaml index 4d2cc00d..95148d1e 100644 --- a/.github/workflows/docker-buildx.yaml +++ b/.github/workflows/docker-buildx.yaml @@ -19,10 +19,6 @@ on: required: false type: string - manifest_from_image: - required: false - type: string - jobs: docker-buildx: runs-on: ubuntu-latest @@ -61,26 +57,3 @@ jobs: build-args: ${{ inputs.build_args }} pull: true push: ${{ github.event_name != 'pull_request' }} - - - name: Copy image manifest - if: github.event_name != 'pull_request' && inputs.manifest_from_image != '' - shell: bash - run: | - set -e - set -o pipefail - - IMAGE=ghcr.io/${{ github.repository_owner }}/${{ inputs.image_name }}:${{ steps.meta.outputs.version }} - - MANIFEST_MEDIA_TYPE=$(docker buildx imagetools inspect --raw $IMAGE | jq -r '.mediaType') - if [[ $MANIFEST_MEDIA_TYPE != "application/vnd.docker.distribution.manifest.list.v2+json" ]]; then - echo "Image manifest is not a manifest list. Skipping manifest copy." - exit 0 - fi - - MANIFEST_FROM_IMAGE=${{ inputs.manifest_from_image }} - PLATFORM=$(docker buildx imagetools inspect --raw $MANIFEST_FROM_IMAGE | jq -cr '.manifests[] | select(.platform.os=="windows") | .platform') - ARCH=$(echo $PLATFORM | jq -r ".architecture") - OS_VERSION=$(echo $PLATFORM | jq -r '."os.version"') - - docker buildx imagetools inspect --raw $IMAGE | jq ".manifests[] | select(.platform.os==\"windows\") | .platform.\"os.version\"=\"${OS_VERSION}\" | .platform.architecture=\"${ARCH}\"" > manifest.json - docker buildx imagetools create -f manifest.json -t $IMAGE