Skip to content

Commit

Permalink
Merge pull request #413 from oat-sa/fix/sonarqube-workflow-update-ops…
Browse files Browse the repository at this point in the history
…-184

update sonarqube workflow
  • Loading branch information
edwin-focaloid authored Apr 16, 2024
2 parents eb0a9e8 + 4ec1c6e commit d2d26ad
Showing 1 changed file with 9 additions and 10 deletions.
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 }}"

0 comments on commit d2d26ad

Please sign in to comment.