OPHYK-318 Give datantuonti import task permission to read from import… #111
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: varda-rekisterointi | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
build: | |
services: | |
postgres: | |
image: postgres:15.7 | |
ports: | |
- 5439:5432 | |
env: | |
POSTGRES_USER: varda-rekisterointi | |
POSTGRES_DB: varda-rekisterointi | |
POSTGRES_PASSWORD: varda-rekisterointi | |
POSTGRES_HOST_AUTH_METHOD: trust | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
cache-dependency-path: varda-rekisterointi/package-lock.json | |
- name: Build frontend | |
working-directory: ./varda-rekisterointi | |
run: | | |
npm ci | |
npm run lint | |
npm test | |
npm run build | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'corretto' | |
cache: 'maven' | |
- name: Maven version | |
run: mvn --version | |
- name: Build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: ./varda-rekisterointi | |
run: mvn clean install -B -Dbranch=$GITHUB_REF_NAME -Drevision=$GITHUB_SHA -DbuildNumber=$GITHUB_RUN_NUMBER/$GITHUB_RUN_ATTEMPT | |
- name: Upload varda-rekisterointi-jar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: varda-rekisterointi-jar | |
path: target/varda-rekisterointi.jar |