File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 31
31
branches : [ master ]
32
32
types : [ opened, reopened, synchronize ]
33
33
34
+ permissions :
35
+ contents : read
36
+
34
37
jobs :
35
38
build-and-analyze :
36
39
71
74
run : sudo apt-get install -y xvfb
72
75
73
76
- name : Build with Maven and run SonarQube analysis
74
- run : xvfb-run ./mvnw clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=iluwatar -Dsonar.projectKey=iluwatar_java-design-patterns -Dsonar.pullrequest.branch=${{ github.head_ref }} -Dsonar.pullrequest.base=${{ github.base_ref }} -Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
75
77
env :
78
+ # Intermediate variable
79
+ HEAD_REF : ${{ github.head_ref }}
76
80
# These two env variables are needed for sonar analysis
77
81
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78
82
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
83
+ run : xvfb-run ./mvnw clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=iluwatar -Dsonar.projectKey=iluwatar_java-design-patterns -Dsonar.pullrequest.branch=$HEAD_REF -Dsonar.pullrequest.base=${{ github.base_ref }} -Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
You can’t perform that action at this time.
0 commit comments