Skip to content

Commit

Permalink
Revert "Update maven.yml"
Browse files Browse the repository at this point in the history
This reverts commit 2947159.
  • Loading branch information
Kaidi Zhang committed Jan 25, 2024
1 parent 2947159 commit bad624f
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# separate terms of service, privacy policy, and support
# documentation.

name: Build & Code Scan
name: Java CI with Maven

on:
push:
Expand All @@ -16,7 +16,7 @@ on:

jobs:
build:
name: Build and analyze

runs-on: ubuntu-latest

steps:
Expand All @@ -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
Expand Down

0 comments on commit bad624f

Please sign in to comment.