Update dependency org.gaul:modernizer-maven-plugin to v3 (#2533) #2581
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: maven-build | |
concurrency: build | |
on: | |
push: | |
branches: [ develop ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f | |
with: | |
disable-sudo: true | |
egress-policy: audit #sonarcloud aws generic hostname unfortunately subject to change | |
- uses: actions/checkout@cbb722410c2e876e24abbe8de2cc27693e501dcb | |
with: | |
fetch-depth: '0' | |
- name: Set up JDK 21 | |
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b | |
with: | |
java-version: 21 | |
distribution: 'temurin' | |
- name: Cache Maven packages | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Cache SonarCloud packages | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
# Next step will start build & deploy maven site with additional artifacts for the Maven site | |
- name: Build and analyze dev | |
run: | | |
git config --global user.email "jens.dibbern@gmail.com" | |
git config --global user.name "datengaertnerei" | |
export OSM_IMPORT_FILE=https://github.com/datengaertnerei/test-data-service/raw/develop/data/osm-small.pbf | |
touch ./mvn-build.log | |
tail -f ./mvn-build.log & | |
./mvnw -B --log-file ./mvn-build.log deploy site org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dorg.slf4j.simpleLogger.defaultLogLevel=warn -Djdk.instrument.traceUsage | |
cp ./mvn-build.log target/site/mvn-build.log.txt | |
mkdir ~/site-tmp | |
cp -r target/site/* ~/site-tmp | |
cp -r target/test-data-service-oas.json ~/site-tmp | |
cp -r target/classes/META-INF/sbom/application.cdx.json ~/site-tmp/test-data-service-bom.json | |
git stash | |
git checkout gh_pages | |
cp -r ~/site-tmp/* docs | |
git add -A docs | |
git commit docs -m "Maven Site generated" | |
git push | |
rm -rf ~/site-tmp | |
git checkout develop | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 |