47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Build docker image
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Setup GraalVM
|
|
uses: graalvm/setup-graalvm@v1
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'graalvm'
|
|
github-token: ${{ secrets.DOCKER_TOKEN }}
|
|
native-image-job-reports: 'true'
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'zulu'
|
|
cache: 'maven'
|
|
|
|
- name: Build with Maven
|
|
run: ./mvnw package -Dnative -DskipTests -Dquarkus.native.remote-container-build=true -Dquarkus.container-image.build=true
|
|
|
|
- name: Login to Docker
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: https://git.la-banquise.fr
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
|
|
- name: Build docker image
|
|
run: docker build -f src/main/docker/Dockerfile.native-micro -t git.la-banquise.fr/malopieds/intra:${{ github.ref_name }} -t git.la-banquise.fr/malopieds/intra:latest .
|
|
|
|
- name: Push docker image
|
|
run: docker push git.la-banquise.fr/malopieds/intra --all-tags
|
|
|