Merge pull request #82 from navikt/dependabot/maven/kotlin.version-2.… #197
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: Bygg og deploy | |
on: | |
push: | |
branches: | |
- master # Push events on master branch | |
jobs: | |
release-notes: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Release Drafter | |
uses: release-drafter/release-drafter@v6 | |
id: drafter | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build: | |
permissions: | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: 'temurin' | |
cache: maven | |
- name: Hent tag | |
run: echo "TAG=$(date +%Y.%m.%d.%H%M%S)-$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV | |
- name: Bygg og test | |
shell: bash | |
run: | | |
echo "Building $(echo $GITHUB_SHA | cut -c1-7)" | |
mvn deploy -Dmaven.wagon.http.pool=false -e --batch-mode --settings ./.m2/settings.xml | |
echo "Bygget og testet" | |
env: | |
GITHUB_USERNAME: x-access-token | |
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Build and analyze | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar --settings ./.m2/settings.xml |