Release OpenJDK Images #152
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################ | |
# Azul Zulu OpenJDK | |
# https://www.azul.com | |
############################################################################ | |
name: Release OpenJDK Images | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'OpenJDK Version' | |
required: true | |
default: 'all' | |
type: choice | |
options: | |
- 'all' | |
- '8' | |
- '11' | |
- '17' | |
- '21' | |
java: | |
description: 'OpenJDK/JRE' | |
required: true | |
default: 'all' | |
type: choice | |
options: | |
- 'all' | |
- 'jdk' | |
- 'jre' | |
os: | |
description: 'OS for base image' | |
required: true | |
default: 'all' | |
type: choice | |
options: | |
- 'all' | |
- 'ubuntu' | |
- 'alpine' | |
jobs: | |
################################################################# | |
# Release OpenJDK | |
release: | |
name: Release OpenJDK Images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Docker(QEMU) | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker(Buildx) | |
uses: docker/setup-buildx-action@v3 | |
with: | |
driver-opts: image=moby/buildkit:master | |
platforms: linux/amd64,linux/arm64 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
#============================ Build ============================ | |
- name: Release Images | |
uses: docker/bake-action@v4 | |
env: | |
ENV_VERSION: ${{ github.event.inputs.version }} | |
ENV_JAVA: ${{ github.event.inputs.java }} | |
ENV_OS: ${{ github.event.inputs.os }} | |
with: | |
targets: openjdk | |
workdir: ./openjdk | |
push: true | |
################################################################# | |
# Test OpenJDK | |
test: | |
name: Test OpenJDK Images | |
runs-on: ubuntu-latest | |
needs: [release] | |
strategy: | |
matrix: | |
version: [8, 11, 17, 21] | |
java: ["jdk", "jre"] | |
os: ["ubuntu", "alpine"] | |
steps: | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
#======================== Test OpenJDK ========================= | |
- name: Test Images | |
run: docker run --rm centralx/openjdk:${{ matrix.java }}${{ matrix.version }}-${{ matrix.os }} |