Skip to content

Bump Quarkus

Bump Quarkus #24

Workflow file for this run

name: Build all docker containers
on:
push:
branches: [main]
paths:
- .github/workflows/build.yml
- micronaut-app/**
- springboot-app/**
- quarkus-app/**
env:
REGISTRY_URL: ghcr.io
PROJECT: azure/aca-java-runtimes-workshop
QUARKUS_APP: quarkus-app
MICRONAUT_APP: micronaut-app
SPRING_APP: springboot-app
jobs:
build_quarkus:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'
cache: 'maven'
- name: Log in to container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Quarkus with Java
run: cd quarkus-app && ./mvnw package
- name: Build and push Quarkus Java image to registry
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ env.REGISTRY_URL }}/${{ env.PROJECT }}/${{ env.QUARKUS_APP }}:latest
file: ./quarkus-app/src/main/docker/Dockerfile.jvm
context: ./quarkus-app/
build_quarkus_native:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '17'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build quarkus-app with GraalVM
run: cd quarkus-app && ./mvnw -Pnative package -Dquarkus.native.container-build=true
- name: Build quarkus-app native Docker image
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ env.REGISTRY_URL }}/${{ env.PROJECT }}/${{ env.QUARKUS_APP }}-native:latest
file: ./quarkus-app/src/main/docker/Dockerfile.native
context: ./quarkus-app/
build_micronaut:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'
cache: 'maven'
- name: Log in to container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Micronaut with Java
run: cd micronaut-app && ./mvnw package
- name: Build and push Micronaut Java image to registry
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ env.REGISTRY_URL }}/${{ env.PROJECT }}/${{ env.MICRONAUT_APP }}:latest
file: ./micronaut-app/src/main/docker/Dockerfile.jvm
context: ./micronaut-app/
build_micronaut_native:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '17'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build micronaut-app with GraalVM
run: cd micronaut-app && ./mvnw package -Dpackaging=native-image
- name: Build micronaut-app native Docker image
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ env.REGISTRY_URL }}/${{ env.PROJECT }}/${{ env.MICRONAUT_APP }}-native:latest
file: ./micronaut-app/src/main/docker/Dockerfile.native
context: ./micronaut-app/
build_sprinboot:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'
cache: 'maven'
- name: Log in to container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Spring Boot with Java
run: |
cd springboot-app && ./mvnw package
mkdir -p target/dependency
cd target/dependency
jar -xf ../*.jar
- name: Build and push Spring Boot Java image to registry
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ env.REGISTRY_URL }}/${{ env.PROJECT }}/${{ env.SPRING_APP }}:latest
file: ./springboot-app/src/main/docker/Dockerfile.jvm
context: ./springboot-app/
build_sprinboot_native:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '17'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build springboot-app with GraalVM
run: |
cd springboot-app && ./mvnw -Pnative native:compile
- name: Build springboot-app native Docker image
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ env.REGISTRY_URL }}/${{ env.PROJECT }}/${{ env.SPRING_APP }}-native:latest
file: ./springboot-app/src/main/docker/Dockerfile.native
context: ./springboot-app/