Build & publish eXo JDK images #64
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
name: Build & publish eXo JDK images | |
on: | |
schedule: | |
- cron: "0 22 * * 6" # Every Saturday at 10 PM UTC | |
workflow_dispatch: | |
jobs: | |
check-available-zulu-jdks: | |
name: Check available Zulu JDKs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check latest jdk versions | |
run: | | |
echo "Fetching latest versions of JDK (${jdk_list}):" | |
for major_jdk_version in ${jdk_list//,/ }; do | |
latestversion=$(curl -fsSL -X GET "https://api.azul.com/metadata/v1/zulu/packages/?java_version=${major_jdk_version}&os=ubuntu&arch=amd&java_package_type=jdk&javafx_bundled=true&release_status=ga&availability_types=CA&certifications=tck&page=1&page_size=1" -H "accept: application/json" | jq -r '.[].java_version | join(",")') | |
[ ${major_jdk_version} -lt '10' ] && paddingspace=" " || paddingspace= | |
echo " - JDK ${paddingspace}${major_jdk_version}: ${latestversion}" | |
done | |
echo "Done" | |
env: | |
jdk_list: 8,11,17,21 | |
build-jdk-images: | |
name: "Build JDK Images" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# JDK 21 | |
## Ubuntu 24.04 (latest) | |
- context: openjdk-21/ubuntu/24.04 | |
imageTag: latest,21,21-ubuntu,21-ubuntu-24,21-ubuntu-2404,openjdk-21,openjdk-21-ubuntu,openjdk-21-ubuntu-24,openjdk-21-ubuntu-2404 | |
## Ubuntu 22.04 | |
- context: openjdk-21/ubuntu/22.04 | |
imageTag: 21-ubuntu-22,21-ubuntu-2204,openjdk-21-ubuntu-22,openjdk-21-ubuntu-2204 | |
# JDK 17 | |
## Ubuntu 24.04 | |
- context: openjdk-17/ubuntu/24.04 | |
imageTag: 17,17-ubuntu,17-ubuntu-24,17-ubuntu-2404,openjdk-17,openjdk-17-ubuntu,openjdk-17-ubuntu-24,openjdk-17-ubuntu-2404 | |
## Ubuntu 22.04 | |
- context: openjdk-17/ubuntu/22.04 | |
imageTag: 17-ubuntu-22,17-ubuntu-2204,openjdk-17-ubuntu-22,openjdk-17-ubuntu-2204 | |
## Ubuntu 20.04 | |
- context: openjdk-17/ubuntu/20.04 | |
imageTag: 17-ubuntu-20,17-ubuntu-2004,openjdk-17-ubuntu-20,openjdk-17-ubuntu-2004 | |
# JDK 11 | |
## Ubuntu 22.04 | |
- context: openjdk-11/ubuntu/22.04 | |
imageTag: 11,11-ubuntu,11-ubuntu-22,11-ubuntu-2204,openjdk-11,openjdk-11-ubuntu,openjdk-11-ubuntu-22,openjdk-11-ubuntu-2204 | |
## Ubuntu 20.04 | |
- context: openjdk-11/ubuntu/20.04 | |
imageTag: 11-ubuntu-20,11-ubuntu-2004,openjdk-11-ubuntu-20,openjdk-11-ubuntu-2004 | |
# JDK 8 | |
## Ubuntu 22.04 | |
- context: openjdk-8/ubuntu/22.04 | |
imageTag: 8,8-ubuntu,8-ubuntu-22,8-ubuntu-2204,openjdk-8,openjdk-8-ubuntu,openjdk-8-ubuntu-22,openjdk-8-ubuntu-2204 | |
## Ubuntu 20.04 | |
- context: openjdk-8/ubuntu/20.04 | |
imageTag: 8-ubuntu-20,8-ubuntu-2004,openjdk-8-ubuntu-20,openjdk-8-ubuntu-2004 | |
uses: exoplatform/swf-scripts/.github/workflows/buildDockerImage.yml@master | |
with: | |
dockerImage: "exoplatform/jdk" | |
dockerFileContext: ${{ matrix.context }} | |
dockerImageTag: ${{ matrix.imageTag }} | |
signImage: true | |
secrets: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
DOCKER_PRIVATE_KEY_ID: ${{ secrets.DOCKER_PRIVATE_KEY_ID }} | |
DOCKER_PRIVATE_KEY: ${{ secrets.DOCKER_PRIVATE_KEY }} | |
DOCKER_PRIVATE_KEY_PASSPHRASE: ${{ secrets.DOCKER_PRIVATE_KEY_PASSPHRASE }} |