Jdk 21 Dependencies upgrade (#11) #29
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: BUILD | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
job-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting for sonar | |
fetch-depth: 0 | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Cache local Maven repository | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
- name: Setup Sonar Scanner | |
uses: warchant/setup-sonar-scanner@v3 | |
with: | |
version: 4.6.2.2472 | |
- name: Run Sonar Scanner | |
env: | |
# provide GITHUB_TOKEN to get access to secrets.SONARQUBE_TOKEN | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: sonar-scanner | |
-Dsonar.login=${{ secrets.SONARQUBE_TOKEN }} | |
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} | |
- name: SonarQube Quality Gate check | |
uses: sonarsource/[email protected] | |
# Force to fail step after specific time | |
timeout-minutes: 5 | |
with: | |
scanMetadataReportFile: .scannerwork/report-task.txt | |
env: | |
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
- name: Validate builds with Leiningen | |
run: lein install | |
job-notify: | |
if: always() | |
name: Post Workflow Status To Slack | |
needs: | |
- job-build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Gamesight/slack-workflow-status@master | |
with: | |
repo_token: ${{secrets.GITHUB_TOKEN}} | |
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} |