Skip to content

Commit

Permalink
Merge pull request #36 from oat-sa/fix/sonarqube-workflow-update-ops-184
Browse files Browse the repository at this point in the history
update sonarqube workflow
  • Loading branch information
edwin-focaloid authored Apr 17, 2024
2 parents 620b26f + b192f07 commit d745ed0
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 d745ed0

Please sign in to comment.