Skip to content

Update dependency org.flywaydb:flyway-database-postgresql to v11 #127

Update dependency org.flywaydb:flyway-database-postgresql to v11

Update dependency org.flywaydb:flyway-database-postgresql to v11 #127

Workflow file for this run

name: build and test
on:
push:
workflow_dispatch:
inputs:
version:
type: string
required: true
description: semver - If set, the image will be published to ghcr.io with the semver as image-Tag.
default: ''
env:
MVN_PROJECT_ROOT: ./
MVN_BUILD_TARGET: ./target
jobs:
compliance:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Advance Security Policy as Code
uses: advanced-security/[email protected]
with:
policy: it-at-m/policy-as-code
policy-path: default.yaml
token: ${{ secrets.GITHUB_TOKEN }}
argvs: "--disable-dependabot --disable-secret-scanning --disable-code-scanning --display"
build:
runs-on: ubuntu-latest
name: Build and test the application
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: test
working-directory: ${{ env.MVN_PROJECT_ROOT }}
run: mvn test
- name: build
working-directory: ${{ env.MVN_PROJECT_ROOT }}
run: mvn install
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: ${{ env.MVN_BUILD_TARGET }}
build-and-push-image-to-ghcr:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: ${{ env.MVN_BUILD_TARGET }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}},value=${{ inputs.version }},enable=${{ github.event_name == 'workflow_dispatch' }}
- name: Build and push untested Docker image to GHCR
uses: docker/build-push-action@v5
with:
context: ${{ env.MVN_PROJECT_ROOT }}
push: ${{ github.event.inputs.version != '' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}