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

update sonarqube workflow #45

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
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
19 changes: 9 additions & 10 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: Sonarqube_CI
on:

pull_request:
types:
- labeled

push:
branches:
- master
- main
- develop

pull_request:
types: [opened, synchronize, reopened]
branches:
- '**'
workflow_dispatch:
- release-*

jobs:
build:
name: Sonarqube_CI
if: ${{ github.event.label.name == 'sonar_check' || github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -26,16 +25,16 @@ jobs:
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_HOST_URL: 'https://sonarqube.taotesting.info/sonarqube/'

# Job will fail when the Quality Gate is red
- name: Sonarqube quality gate check
id: sonarqube-quality-gate-check
id: sonarqube-quality-gate-check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}


- name: "Example show SonarQube Quality Gate Status value"
run: echo "The Quality Gate status is ${{ steps.sonarqube-quality-gate-check.outputs.quality-gate-status }}"
run: echo "The Quality Gate status is ${{ steps.sonarqube-quality-gate-check.outputs.quality-gate-status }}"