chore: Automatic Docker build using jlink to reduce jvm size #1
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 java | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
push: | |
name: "jib Docker build" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Set up QEMU for multi-platform support | |
# uses: docker/setup-qemu-action@v3 | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v3 | |
# with: | |
# buildkitd-flags: --debug | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 21 | |
cache: gradle | |
- name: Publish image | |
run: gradle jib |