-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.29 KB
/
docker-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build Quarkus Image and Push to Docker Hub
on:
push:
branches:
- master
workflow_dispatch: # Allows manual trigger of the workflow
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# Set up Java (GraalVM) and Maven
- name: Set up Java 17 and Maven
uses: actions/setup-java@v3
with:
distribution: 'temurin' # Alternatively, you can use 'graalvm' if you want GraalVM JDK for Java 17
java-version: '17'
# Set up Docker Buildx (required for multi-platform builds)
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Build Quarkus Native Image
- name: Build Quarkus Image
run: |
mvn clean install package -DskipTests
# Build and Push Docker Image
- name: Build and push Docker image
run: |
docker buildx build --push --platform linux/amd64,linux/arm6 -f src/main/docker/Dockerfile.jvm -t r0ufif0u/metaflux:promofacie-verifier-r0 .