Release Gradle Images #80
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
############################################################################ | |
# Gradle with Azul Zulu OpenJDK | |
# https://gradle.org | |
# https://www.azul.com | |
############################################################################ | |
name: Release Gradle Images | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Gradle Version' | |
required: true | |
default: 'all' | |
type: choice | |
options: | |
- 'all' | |
- '7' | |
- '8' | |
jobs: | |
################################################################# | |
# Release Gradle | |
release: | |
name: Release Gradle 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@v5 | |
env: | |
ENV_VERSION: ${{ github.event.inputs.version }} | |
with: | |
targets: gradle | |
workdir: ./gradle | |
push: true | |
################################################################# | |
# Test Gradle | |
test: | |
name: Test Gradle Images | |
runs-on: ubuntu-latest | |
needs: [release] | |
strategy: | |
matrix: | |
version: [7, 8] | |
openjdk: [8, 11, 17, 21] | |
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/gradle:${{ matrix.version }}-jdk${{ matrix.openjdk }}-${{ matrix.os }} |