Skip to content

Pull request #413: Enable Physical flow registration button for eudas #1456

Pull request #413: Enable Physical flow registration button for eudas

Pull request #413: Enable Physical flow registration button for eudas #1456

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Waltz Build (pg)
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_DB: waltz
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2
restore-keys: ${{ runner.os }}-m2
- name: Update Maven Project Version
if: ${{ github.ref_type == 'tag' }}
run: mvn versions:set -DnewVersion=${{ github.ref_name }} -Pci,build-postgres,waltz-postgres;
- name: Build with Maven
run: mvn -Dmaven.test.failure.ignore=true -B -ntp -s .build.settings.xml -Pbuild-postgres,waltz-postgres,integration-tests clean package site;
- name: Publish build
uses: actions/upload-artifact@v4
with:
name: waltz-web-postgres.war
path: waltz-web/target/waltz-web.war
- name: Publish mocha results
uses: actions/upload-artifact@v4
with:
name: mocha-test-results.txt
path: waltz-ng/mocha-test-results.txt
- name: Publish liquibase changelogs
uses: actions/upload-artifact@v4
with:
name: liquibase-changelogs
path: waltz-schema/src/main/resources/liquibase/
- name: Publish Java Test results
uses: actions/upload-artifact@v4
with:
name: surefire-results.html
path: target/site/surefire-report.html
- name: Login to GitHub Registry
if: ${{ github.ref_type == 'tag' }}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}
flavor: latest=true
tags: |
type=ref,event=tag,enable=${{ github.ref_type == 'tag' }}
type=raw,value=postgres-${{ github.ref_name }},enable=${{ github.ref_type == 'tag' }}
type=raw,value=postgres
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.ref_type == 'tag' }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ github.ref_type == 'tag' }}
with:
files: |
waltz-schema/target/liquibase-scripts.zip
waltz-web/target/waltz-web.war
waltz-web/target/waltz-web-jar-with-dependencies.jar