Skip to content

Commit

Permalink
Throw error if sonar label is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter committed Jan 26, 2024
1 parent 736b81a commit 1257c7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ env:

jobs:
sonar:
if: contains(github.event.pull_request.labels.*.name, 'sonar-scan-approved')
runs-on: ubuntu-latest
steps:
- name: Check the presence of the label `sonar-scan-approved`
if: contains(github.event.pull_request.labels.*.name, 'sonar-scan-approved') != true
run: echo "Add the label 'sonar-scan-approved' to activate Sonar scan"; exit 1

- uses: actions/checkout@v3
name: Checkout ${{ env.HEAD_REPOSITORY }}:${{ env.HEAD_REF }}
with:
Expand Down

0 comments on commit 1257c7c

Please sign in to comment.