Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lvermeulen authored Apr 15, 2022
1 parent a3669d2 commit ec64b88
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,37 @@ jobs:
python -m pip install --upgrade pip
pip install requests markdown argparse
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v1
with:
path: ./.sonar/scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner

- name: Install SonarCloud scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: bash
run: |
mkdir .sonar
mkdir .sonar/scanner
dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner
- name: Sonar begin Build & analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: bash
run: |
./.sonar/scanner/dotnet-sonarscanner begin /k:"Informatievlaanderen_event-handling" /o:"informatievlaanderen" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
- name: Run Semantic Release
shell: bash
run: npx semantic-release
Expand All @@ -94,6 +125,14 @@ jobs:
GIT_EMAIL: ${{ secrets.VBR_GIT_EMAIL }}
GIT_AUTHOR_EMAIL: ${{ secrets.VBR_GIT_EMAIL }}
GIT_COMMITTER_EMAIL: ${{ secrets.VBR_GIT_EMAIL }}

- name: Sonar end Build & analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: bash
run: |
./.sonar/scanner/dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
- name: Set Release Version
run: |
Expand Down

0 comments on commit ec64b88

Please sign in to comment.