Skip to content

OPHYK-204 run app with tomcat9x in local #114

OPHYK-204 run app with tomcat9x in local

OPHYK-204 run app with tomcat9x in local #114

name: kayttooikeus
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13.4
ports:
- 5437:5432
env:
POSTGRES_USER: app
POSTGRES_DB: kayttooikeus
POSTGRES_PASSWORD: kayttooikeus
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "corretto"
cache: "maven"
- name: Maven version
run: mvn --version
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
working-directory: ./kayttooikeus-service
run: mvn clean install -B -Dbranch=$GITHUB_REF_NAME -Drevision=$GITHUB_SHA -DbuildNumber=$GITHUB_RUN_NUMBER/$GITHUB_RUN_ATTEMPT org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Opetushallitus_kayttooikeus