Browse Source

SONAR-19707 Remove usage of GITHUB_TOKEN in GitHub Actions tutorials

tags/10.2.0.77647
7PH 9 months ago
parent
commit
b1417f8ffd

+ 0
- 3
server/sonar-web/src/main/js/components/tutorials/github-action/__tests__/__snapshots__/GithubActionTutorial-it.tsx.snap View File

@@ -43,7 +43,6 @@ jobs:
dotnet tool update dotnet-sonarscanner --tool-path .\\.sonar\\scanner
- name: Build and analyze
env:
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
shell: powershell
run: |
.\\.sonar\\scanner\\dotnet-sonarscanner begin /k:"my-project" /d:sonar.token="\${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="\${{ secrets.SONAR_HOST_URL }}"
@@ -223,7 +222,6 @@ jobs:
restore-keys: \${{ runner.os }}-gradle
- name: Build and analyze
env:
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
run: ./gradlew build sonar --info"
@@ -291,7 +289,6 @@ jobs:
restore-keys: \${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=my-project -Dsonar.projectName='MyProject'"

+ 0
- 1
server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx View File

@@ -56,7 +56,6 @@ function dotnetYamlSteps(projectKey: string) {
dotnet tool update dotnet-sonarscanner --tool-path .\\.sonar\\scanner
- name: Build and analyze
env:
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
shell: powershell
run: |
.\\.sonar\\scanner\\dotnet-sonarscanner begin /k:"${projectKey}" /d:sonar.token="\${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="\${{ secrets.SONAR_HOST_URL }}"

+ 0
- 1
server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx View File

@@ -49,7 +49,6 @@ const GRADLE_YAML_STEPS = `
restore-keys: \${{ runner.os }}-gradle
- name: Build and analyze
env:
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
run: ./gradlew build sonar --info`;

+ 0
- 1
server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx View File

@@ -49,7 +49,6 @@ function mavenYamlSteps(projectKey: string, projectName: string) {
restore-keys: \${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=${projectKey} -Dsonar.projectName='${projectName}'`;

Loading…
Cancel
Save