Skip to content

build java

build java #212

Workflow file for this run

name: build java
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
push:
branches:
- master
paths:
- java/**
jobs:
push:
name: "java:${{ matrix.jdk }}_${{ matrix.tag }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
jdk:
- temurin
- zulu
- openjdk
- amazoncorretto
- graalvm
tag:
- '8' # MC before 1.17
- '8-forge' # MC before 1.17
- '11' # MC before 1.17
- '11-forge' # MC before 1.17
- '16' # MC 1.17
- '17' # MC 1.18
- '21' # MC 1.21
- '22'
- '23'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Check file existence
id: check_files
uses: andstor/[email protected]
with:
files: "./java/${{ matrix.jdk }}/${{ matrix.tag }}/Dockerfile"
- uses: docker/setup-qemu-action@v3
if: ${{ steps.check_files.outputs.files_exists == 'true' }}
- uses: docker/setup-buildx-action@v3
if: ${{ steps.check_files.outputs.files_exists == 'true' }}
with:
buildkitd-flags: --debug
driver-opts: |
image=moby/buildkit:latest
- uses: docker/login-action@v3
if: ${{ steps.check_files.outputs.files_exists == 'true' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v6
if: ${{ steps.check_files.outputs.files_exists == 'true' }}
with:
context: ./java
file: ./java/${{ matrix.jdk }}/${{ matrix.tag }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/egomaw/java:${{ matrix.jdk }}_${{ matrix.tag }}