Skip to content

try: with mandrel-latest #46

try: with mandrel-latest

try: with mandrel-latest #46

# This workflow will build a Quarkus Native project with Maven and Jib.
# It caches/restores any maven dependency to improve the workflow execution time.
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: quarkus-native-mandrel-jib
on: [ push, pull_request, workflow_dispatch ]
env:
JIB_BUILD_OPTS:
-Dquarkus.container-image.build=true
-Dquarkus.container-image.push=true
-Dquarkus.container-image.registry=ghcr.io
-Dquarkus.container-image.group=${{ github.actor }}
-Dquarkus.container-image.username=${{ github.actor }}
-Dquarkus.container-image.password=${{ secrets.GITHUB_TOKEN }}
-Dquarkus.jib.base-native-image=quay.io/quarkus/quarkus-distroless-image:2.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: GitHub Action for setting up Mandrel
uses: graalvm/setup-graalvm@v1
with:
version: 'mandrel-latest'
java-version: '17'
cache: 'maven'
- name: Build Quarkus Native with Maven, Mandrel and Jib
run: mvn -B package -Dnative $JIB_BUILD_OPTS