-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (41 loc) · 1.24 KB
/
build-dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build
on:
push:
branches:
- main
paths-ignore:
- README.md
- .gitignore
- kafka/**
workflow_dispatch:
pull_request:
jobs:
build:
name: Build and sonar
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0 # brukes for å unngå feil i differ i sonar
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Bygg (dependabot)
if: github.actor == 'dependabot[bot]'
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn verify --settings .m2/maven-settings.xml --file pom.xml
- name: Bygg og SonarCloud
if: github.actor != 'dependabot[bot]'
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_PROJECTKEY: ${{ secrets.SONAR_PROJECTKEY }}
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
run: mvn verify --settings .m2/maven-settings.xml --file pom.xml
#run: mvn verify sonar:sonar --settings .m2/maven-settings.xml --file pom.xml