Skip to content

Drop JDK11 images for WildFly 35 #59

Drop JDK11 images for WildFly 35

Drop JDK11 images for WildFly 35 #59

Workflow file for this run

name: Build and push WildFly Docker images
# This action requires 4 secrets:
# secrets.REGISTRY - the container registry (e.g. quay.io)
# secrets.IMAGE - the namespaced name of the image (e.g. wildfly/wildfly)
# secrets.REGISTRY_USER - the user name to authentication before pushing the image
# secrets.REGISTRY_PASSWORD - the user password to authentication before pushing the image
on:
push:
branches:
- "main"
tags:
- "*"
pull_request:
branches:
- "main"
jobs:
test:
# Only build linux/amd64 images for testing
env:
IMAGE_TEST: wildfly-test:latest
strategy:
matrix:
include:
- jdk-version: 11
dist: ubi9-minimal
platforms: linux/amd64
- jdk-version: 17
dist: ubi9-minimal
platforms: linux/amd64
- jdk-version: 21
dist: ubi9-minimal
platforms: linux/amd64
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4.2.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
- name: Build WildFly images
id: docker_build
uses: docker/build-push-action@v6.9.0
with:
load: true
tags: ${{ env.IMAGE_TEST }}
build-args: |
jdk=${{ matrix.jdk-version }}
dist=${{ matrix.dist }}
- name: Smoke Test
run: |
./scripts/smoke-test.sh ${{ env.IMAGE_TEST }}
# Push to the container registry only when a new tag is pushed
push:
needs: test
environment: quay.io
if: startsWith(github.event.ref, 'refs/tags/')
env:
# Put the "latest" tag on this JDK version
JDK_VERSION_FOR_LATEST: 21
strategy:
matrix:
include:
- jdk-version: 17
dist: ubi9-minimal
platforms: linux/amd64,linux/arm64,linux/ppc64le
- jdk-version: 21
dist: ubi9-minimal
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4.2.2
- name: Docker meta
id: meta
uses: docker/metadata-action@v5.5.1
with:
images: ${{ secrets.REGISTRY }}/${{ secrets.IMAGE }}
flavor: |
latest=false
tags: |
type=ref,event=tag,suffix=-jdk${{ matrix.jdk-version }}
type=raw,value=latest,suffix=-jdk${{ matrix.jdk-version }}
type=raw,value=latest,enable=${{ matrix.jdk-version == env.JDK_VERSION_FOR_LATEST }}
labels: |
org.opencontainers.image.jdk-version=${{ matrix.jdk-version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
- name: Docker Login to Quay.io
if: startsWith(github.event.ref, 'refs/tags/')
uses: docker/login-action@v3.3.0
with:
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Push WildFly images to container registry
id: docker_push
uses: docker/build-push-action@v6.9.0
with:
push: true
platforms: ${{ matrix.platforms }}
build-args: |
jdk=${{ matrix.jdk-version }}
dist=${{ matrix.dist }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}