Skip to content

OPHYK-204 remove unused template files etc. #127

OPHYK-204 remove unused template files etc.

OPHYK-204 remove unused template files etc. #127

name: CAS-virkailija
on:
push:
branches: [ master ]
pull_request:
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'corretto'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: Build
working-directory: ./cas-virkailija
run: ./gradlew clean build -Dbranch=$GITHUB_REF_NAME -Drevision=$GITHUB_SHA -DbuildNumber=$GITHUB_RUN_NUMBER/$GITHUB_RUN_ATTEMPT
- name: Upload cas-war
uses: actions/upload-artifact@v4
with:
name: cas-war
path: cas-virkailija/build/libs/cas.war
sonarcloud:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'corretto'
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
working-directory: ./cas-virkailija
run: ./gradlew build sonarqube