Skip to content

attempt to add java

attempt to add java #1

Workflow file for this run

name: Docker image (Java)
on:
push:
branches:
- master
paths:
- 'java.Dockerfile'
- 'java.entrypoint.sh'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
java:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[skip-ci]') }}
strategy:
fail-fast: false
matrix:
java_version: [11, 17, 21, 22, 23, 24]
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3
- name: Login to DockerHub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6
with:
build-args: JAVA_VERSION=${{ matrix.java_version }}
context: .
file: java.Dockerfile
platforms: linux/amd64, linux/arm64
push: true
tags: djoh/all-in-one:java${{ matrix.java_version }}
cache-from: type=registry,ref=djoh/all-in-one:buildcache_java${{ matrix.java_version }}
cache-to: type=registry,ref=djoh/all-in-one:buildcache_java${{ matrix.java_version }},mode=max