Replace java 17 with java 21 in github actions CI build #53
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: ukelonn CI build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up OpenJDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
- name: Add ssh key | |
run: | | |
mkdir -p /home/runner/.m2 | |
cp .github/workflows/settings.xml /home/runner/.m2 | |
mkdir -p /home/runner/.ssh | |
ssh-keyscan maven.bang.priv.no >> /home/runner/.ssh/known_hosts | |
echo "${{ secrets.MAVEN_SSH_KEY }}" > /home/runner/.ssh/github_actions | |
chmod 600 /home/runner/.ssh/github_actions | |
- name: Build with Maven | |
run: mvn -B org.jacoco:jacoco-maven-plugin:prepare-agent install coveralls:report sonar:sonar --file pom.xml --define repoToken=${{ secrets.COVERALLS_REPO_SECRET }} -Dsonar.projectKey=steinarb_ukelonn -Dsonar.organization=steinarb -Dsonar.host.url=https://sonarcloud.io | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Deploy snapshot to maven repo | |
run: mvn -B deploy -DskipTests=true | |
env: | |
REPO_USER: ${{ secrets.REPO_USER }} |