build: use multi-arch platforms in verify-pr (#2166)

...and corrected for lack of arm/v7 support in eclipse-temurin:20-jre image
This commit is contained in:
Geoff Bourne 2023-05-31 13:14:05 -05:00 committed by GitHub
parent e443d6ecf4
commit bc4ffe6493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 6 deletions

View File

@ -37,7 +37,7 @@ jobs:
# JAVA 20: # JAVA 20:
- variant: java20 - variant: java20
baseImage: eclipse-temurin:20-jre baseImage: eclipse-temurin:20-jre
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: linux/amd64,linux/arm64
mcVersion: 1.19.3 mcVersion: 1.19.3
- variant: java20-alpine - variant: java20-alpine
baseImage: eclipse-temurin:20-jre-alpine baseImage: eclipse-temurin:20-jre-alpine

View File

@ -24,18 +24,18 @@ jobs:
# JAVA 20: # JAVA 20:
- variant: java20 - variant: java20
baseImage: eclipse-temurin:20-jre baseImage: eclipse-temurin:20-jre
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: linux/amd64,linux/arm64
mcVersion: 1.19.3 mcVersion: 1.19.4
# JAVA 17: # JAVA 17:
- variant: java17 - variant: java17
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343 # jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
baseImage: eclipse-temurin:17-jre-focal baseImage: eclipse-temurin:17-jre-focal
platforms: linux/amd64 platforms: linux/amd64
mcVersion: 1.18.2 mcVersion: 1.19.4
- variant: java17-alpine - variant: java17-alpine
baseImage: eclipse-temurin:17-jre-alpine baseImage: eclipse-temurin:17-jre-alpine
platforms: linux/amd64 platforms: linux/amd64
mcVersion: 1.18.2 mcVersion: 1.19.4
- variant: java8-multiarch - variant: java8-multiarch
baseImage: eclipse-temurin:8u312-b07-jre-focal baseImage: eclipse-temurin:8u312-b07-jre-focal
platforms: linux/amd64 platforms: linux/amd64
@ -53,9 +53,21 @@ jobs:
- name: Setup Docker Buildx - name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
- name: Confirm multi-arch build
uses: docker/build-push-action@v3.3.0
with:
platforms: ${{ matrix.platforms }}
# ensure latest base image is used
pull: true
build-args: |
BASE_IMAGE=${{ matrix.baseImage }}
cache-from: type=gha,scope=${{ matrix.variant }}
- name: Build for test - name: Build for test
uses: docker/build-push-action@v3.3.0 uses: docker/build-push-action@v3.3.0
with: with:
# Only build single platform since loading multi-arch image into daemon fails with
# "docker exporter does not currently support exporting manifest lists"
platforms: linux/amd64 platforms: linux/amd64
tags: ${{ env.IMAGE_TO_TEST }} tags: ${{ env.IMAGE_TO_TEST }}
# ensure latest base image is used # ensure latest base image is used

View File

@ -23,7 +23,7 @@ When using the image `itzg/minecraft-server` without a tag, the `latest` image t
| java17-graalvm-ce | 17 | Oracle | GraalVM CE | amd64,arm64 | | java17-graalvm-ce | 17 | Oracle | GraalVM CE | amd64,arm64 |
| java17-alpine | 17 | Alpine | Hotspot | amd64 | | java17-alpine | 17 | Alpine | Hotspot | amd64 |
| java20-alpine | 19 | Alpine | Hotspot | amd64 | | java20-alpine | 19 | Alpine | Hotspot | amd64 |
| java20 | 19 | Ubuntu | Hotspot | amd64,arm64,armv7 | | java20 | 19 | Ubuntu | Hotspot | amd64,arm64 |
For example, to use Java version 8 on any supported architecture: For example, to use Java version 8 on any supported architecture: