Skip to content

Merge pull request #110 from jbosstm/dependabot/maven/org.apache.mave… #64

Merge pull request #110 from jbosstm/dependabot/maven/org.apache.mave…

Merge pull request #110 from jbosstm/dependabot/maven/org.apache.mave… #64

Workflow file for this run

name: Narayana LRA Coordinator quay.io image push
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'pom.xml'
jobs:
build:
runs-on: ubuntu-latest
name: Push image to quay.io
if: ${{ contains(github.event.head_commit.message, 'narayana-bom') || contains(github.event.head_commit.message, 'quarkus.platform.version') || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Check changed files
id: check_upgrades
run: |
set +e
git diff -U0 HEAD^ HEAD | grep "<quarkus.platform.version>\|<narayana.version>"
export narayana_or_quarkus_upgrade=$(echo $?)
set -e
echo "::set-output name=NARAYANA_OR_QUARKUS_UPGRADE::$narayana_or_quarkus_upgrade"
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: 17
distribution: temurin
cache: maven
check-latest: true
- name: Build, Test and push image
if: ${{ steps.check_upgrades.outputs.NARAYANA_OR_QUARKUS_UPGRADE == '0' || github.event_name == 'workflow_dispatch' }}
run: |
./mvnw clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true \
-Dquarkus.container-image.tag=$(./mvnw help:evaluate -Dexpression=narayana.version -q -DforceStdout)-$(./mvnw help:evaluate -Dexpression=quarkus.platform.version -q -DforceStdout)
env:
QUARKUS_CONTAINER_IMAGE_USERNAME: ${{ secrets.QUARKUS_CONTAINER_IMAGE_USERNAME }}
QUARKUS_CONTAINER_IMAGE_PASSWORD: ${{ secrets.QUARKUS_CONTAINER_IMAGE_PASSWORD }}