Skip to content

Commit

Permalink
Merge pull request #47 from niscy-eudiw/feature/sonar
Browse files Browse the repository at this point in the history
Updates on sonar workflow
  • Loading branch information
vafeini authored Jul 12, 2023
2 parents 77e2333 + d0464c3 commit 408298c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: SonarCloud
on:
push:
branches: [ 'main', 'feature/*' ]
branches: [ 'main', 'release/*' ]
tags: [ v* ]
workflow_dispatch:

jobs:
run-sast:
name: Build and run SonarQube analysis
# Run on external PRs, but not on internal PRs since those will be run by push to branch
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
Expand Down Expand Up @@ -42,11 +40,12 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN}}
- name: Build with Gradle Wrapper & Run Sonar
if: (steps.checksecrets.outputs.secretspresent == 'YES')
uses: gradle/gradle-build-action@v2.5.1
uses: gradle/gradle-build-action@v2.6.0
with:
gradle-version: wrapper
arguments: build sonar --info --full-stacktrace -Dsonar.organization=${{ github.repository_owner }} -Dsonar.projectKey=${{ env.PROJECTKEY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
CI: true

0 comments on commit 408298c

Please sign in to comment.