Security/#57 CVE 2024 47535 #116
Workflow file for this run
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: CI Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
name: Build native-image on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: "bash" | |
permissions: | |
contents: read | |
checks: write | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
concurrency: | |
group: ${{ github.workflow }}-${{ matrix.os }}-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: "17" | |
distribution: "graalvm-community" | |
components: "native-image" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Cache local Maven repository | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v4 | |
if: ${{ env.SONAR_TOKEN != null && matrix.os == 'ubuntu-latest' }} | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Run tests and build with Maven | |
run: | | |
mvn --batch-mode clean verify \ | |
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ | |
-DtrimStackTrace=false | |
- name: Publish Test Report | |
uses: scacap/action-surefire-report@v1 | |
if: ${{ always() && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Sonar analysis | |
if: ${{ env.SONAR_TOKEN != null && matrix.os == 'ubuntu-latest' }} | |
run: | | |
mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ | |
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ | |
-DtrimStackTrace=false \ | |
-Dsonar.token=$SONAR_TOKEN | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Upload binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: executable-${{ matrix.os }} | |
path: | | |
target/${{ github.event.repository.name }} | |
target/${{ github.event.repository.name }}.exe | |
if-no-files-found: error |