Skip to content

Commit

Permalink
fix: create multiarch image manifest with tools compatible with lates…
Browse files Browse the repository at this point in the history
…t buildx extension

Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
  • Loading branch information
mkuznyetsov committed Feb 22, 2023
1 parent cf97e06 commit 8a7b1f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/next-build-multiarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ jobs:
-
name: "Set up Docker Buildx ${{ matrix.arch }}"
uses: docker/setup-buildx-action@v2
with:
version: v0.9.1
-
name: "Docker quay.io Login"
uses: docker/login-action@v2
Expand Down Expand Up @@ -92,19 +90,18 @@ jobs:
AMEND=""
AMD64_VERSION="${{ needs['build-images'].outputs.amd64 }}"
if [ -n "$AMD64_VERSION" ]; then
AMEND+=" --amend ${{ env.IMAGE }}:$AMD64_VERSION";
AMEND+=" ${{ env.IMAGE }}:$AMD64_VERSION";
fi
ARM64_VERSION="${{ needs['build-images'].outputs.arm64 }}"
if [ -n "$ARM64_VERSION" ]; then
AMEND+=" --amend ${{ env.IMAGE }}:$ARM64_VERSION";
AMEND+=" ${{ env.IMAGE }}:$ARM64_VERSION";
fi
PPC64LE_VERSION="${{ needs['build-images'].outputs.ppc64le }}"
if [ -n "$PPC64LE_VERSION" ]; then
AMEND+=" --amend ${{ env.IMAGE }}:$PPC64LE_VERSION";
AMEND+=" ${{ env.IMAGE }}:$PPC64LE_VERSION";
fi
if [ -z "$AMEND" ]; then
echo "[!] The job 'build-images' didn't provide any outputs. Can't create the manifest list."
exit 1;
fi
docker manifest create ${{ env.IMAGE }}:next $AMEND
docker manifest push ${{ env.IMAGE }}:next
docker buildx imagetools create -t ${{ env.IMAGE }}:next $AMEND
10 changes: 2 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ jobs:
-
name: "Set up Docker Buildx ${{ matrix.arch }}"
uses: docker/setup-buildx-action@v2
with:
version: v0.9.1
-
name: "Docker quay.io Login"
uses: docker/login-action@v2
Expand Down Expand Up @@ -86,13 +84,9 @@ jobs:
exit 1;
fi
AMEND=""
AMEND+=" --amend ${{ env.IMAGE }}:$AMD64_VERSION";
AMEND+=" --amend ${{ env.IMAGE }}:$ARM64_VERSION";
AMEND+=" --amend ${{ env.IMAGE }}:$PPC64LE_VERSION";
AMEND="${{ env.IMAGE }}:$AMD64_VERSION ${{ env.IMAGE }}:$ARM64_VERSION ${{ env.IMAGE }}:$PPC64LE_VERSION";
docker manifest create ${{ env.IMAGE }}:${{ github.event.inputs.version }} $AMEND
docker manifest push ${{ env.IMAGE }}:${{ github.event.inputs.version }}
docker buildx imagetools create -t ${{ env.IMAGE }}:${{ github.event.inputs.version }} $AMEND
-
id: result
name: "Manifest result"
Expand Down

0 comments on commit 8a7b1f0

Please sign in to comment.