From bad624ff8ab10d0873c502a06256f47e6132c630 Mon Sep 17 00:00:00 2001 From: Kaidi Zhang Date: Fri, 26 Jan 2024 00:05:00 +0800 Subject: [PATCH] Revert "Update maven.yml" This reverts commit 29471592b828a508614d0f3d507872bdbf1ea48e. --- .github/workflows/maven.yml | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 181fa62..ff35a57 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -6,7 +6,7 @@ # separate terms of service, privacy policy, and support # documentation. -name: Build & Code Scan +name: Java CI with Maven on: push: @@ -16,7 +16,7 @@ on: jobs: build: - name: Build and analyze + runs-on: ubuntu-latest steps: @@ -27,25 +27,8 @@ jobs: java-version: '21' distribution: 'temurin' cache: maven - - name: Cache SonarCloud packages - uses: actions/cache@v3 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - # - name: Build with Maven - # run: mvn -B package --file pom.xml - - name: Cache Maven packages - uses: actions/cache@v3 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - 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 -Dsonar.projectKey=zteric_cicd-demo + - name: Build with Maven + run: mvn -B package --file pom.xml # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - name: Update dependency graph