forked from christosservos/Alamofire
-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (26 loc) · 1.02 KB
/
sonarcloud.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: SonarWflow
on:
push:
pull_request_target:
jobs:
sonarcloud:
name: SonarJob
runs-on: ubuntu-latest
steps:
- name: Checkout action
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud env setup
run: |
echo "PROJECTKEY=${{ github.repository_owner}}_$(echo ${{ github.repository }} | sed 's/.*\///')" >> $GITHUB_ENV
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=${{ github.repository_owner}}
-Dsonar.projectKey=${{ env.PROJECTKEY }}
# -Dsonar.tests=Tests/ #-Dsonar.projectKey=${{ env.PROJECTKEY }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
#PROJECTKEY: ${{ github.repository_owner}}_$(echo ${{ github.repository }} | sed 's/.*\///')