Skip to content

Partial refactoring #67

Partial refactoring

Partial refactoring #67

Workflow file for this run

name: Build
on:
push:
branches:
- main
- develop
release:
types:
- published
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
jdk: [17,20]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare version labels
uses: k15g/action-version-labels@edge
with:
prefix: project
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: ${{ matrix.jdk }}
- name: Build with Maven
run: mvn -B --no-transfer-progress package
- name: Docker login
uses: docker/login-action@v1
if: matrix.jdk == 8
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build Docker image
run: make docker_build tag=dev
if: matrix.jdk == 8
- name: Push egde images
if: "matrix.jdk == 8 && !startsWith(github.ref, 'refs/tags/')"
run: make docker_push tag=edge
- name: Push images
if: "matrix.jdk == 8 && startsWith(github.ref, 'refs/tags/')"
run: |
make docker_push tag=${{ env.PROJECT_VERSION }}
make docker_push tag=latest