Skip to content

build java

build java #6

Workflow file for this run

name: build java
on:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *"
push:
branches:
- develop
paths:
- java/**
- .github/workflows/java.yml
permissions:
contents: read
packages: write
jobs:
push:
name: "Build java: ${{ matrix.tag }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag:
- "11j9"
- "11"
- "17"
- "21"
- "22"
- "25"
- "26"
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
with:
platforms: amd64,arm64
image: tonistiigi/binfmt:qemu-v7.0.0-28
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
context: ./java
file: ./java/${{ matrix.tag }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/nodebytehosting/java:java_${{ matrix.tag }}
ghcr.io/nodebytehosting/java:java_${{ matrix.tag }}-latest