Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github actions maven snyk and sonar #8

Closed
wants to merge 15 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
maven steps consistent with normale mvn build (without wrapper; same …
…setup-java)
  • Loading branch information
tubbynl committed Jan 31, 2022
commit b33c2515fb6c74960e19b7a7c82a0baaf1eea00f
13 changes: 5 additions & 8 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,13 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
java-version: 11
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./mvnw -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.branch.name=${{ steps.extract_branch.outputs.branch }}
run: mvn -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar