Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-neolight into develop
  • Loading branch information
AB-xdev committed May 27, 2024
2 parents 1ee0c2f + ed519d7 commit 5a783e7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,22 @@ env:
SONARCLOUD_HOST: https://sonarcloud.io

jobs:
token-check:
runs-on: ubuntu-latest
outputs:
hasToken: ${{ steps.check-token.outputs.has }}
steps:
- id: check-token
run: |
[ -z $SONAR_TOKEN ] && echo "has=false" || echo "has=true" >> "$GITHUB_OUTPUT"
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

sonar:
name: SonarCloud Scan
runs-on: ubuntu-latest
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) && secrets.SONAR_TOKEN != '' }}
needs: token-check
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) && needs.token-check.outputs.hasToken }}
steps:
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 5a783e7

Please sign in to comment.