Skip to content

Save changes

Save changes #343

name: PR build container images
on: [ push ]
jobs:
container-images:
if: ${{ github.event_name != 'pull_request' && github.repository_owner != 'project-openubl' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: maven
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Build container image
run: |
mvn -U -B package --file pom.xml -DskipTests \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.registry=ghcr.io \
-Dquarkus.container-image.group=${{ github.repository_owner }} \
-Dquarkus.container-image.name=${{ github.event.repository.name }}/ublhub \
-Dquarkus.container-image.tag=${{ steps.extract_branch.outputs.branch }} \
-Dquarkus.container-image.username=${{ github.actor }} \
-Dquarkus.container-image.password=${{ secrets.GITHUB_TOKEN }} \
-P ui,${{ matrix.flavor }} \
-P native,ui,${{ matrix.flavor }} \
-f application