Skip to content

Commit

Permalink
ci: add git lfs option to sonar step analyze (#93)
Browse files Browse the repository at this point in the history
* ci: add git lfs option to sonar step analyze

* fix: sonarQube

* fix: sonarQube

* fix: sonarQube

* fix: sonarQube

* fix: sonarQube

* fix: sonarQube

* fix: sonarQube

---------

Co-authored-by: dennis-avesani-zupit <[email protected]>
  • Loading branch information
1 parent e2eae9b commit d9be2dd
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/actions/sonar/analyze/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Sonar step analyze with artifacts

inputs:
WORKING_DIRECTORY:
required: true
type: string
CHECK_QUALITY_GATE:
required: false
type: boolean
default: false
DOWNLOAD_ARTIFACT:
required: false
type: boolean
default: true
ARTIFACT_FILENAME:
required: false
type: string
default: ""
ARTIFACT_PATH:
required: false
type: string
default: ".coverage-reports/"


runs:
using: composite

steps:
- name: Download coverage artifact
if: ${{ inputs.DOWNLOAD_ARTIFACT }}
uses: actions/download-artifact@v3
with:
name: ${{inputs.ARTIFACT_FILENAME}}
path: ${{ inputs.WORKING_DIRECTORY }}/${{ inputs.ARTIFACT_PATH }}

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
projectBaseDir: ${{ inputs.WORKING_DIRECTORY }}
args: >
-Dsonar.qualitygate.wait=${{ inputs.CHECK_QUALITY_GATE }}
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} -Dsonar.login=${{ secrets.SONAR_TOKEN }}

0 comments on commit d9be2dd

Please sign in to comment.