diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-unit-tests.yml similarity index 97% rename from .github/workflows/run-test.yml rename to .github/workflows/run-unit-tests.yml index f954fd9..3780d4e 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-unit-tests.yml @@ -6,7 +6,7 @@ on: pull_request: types: [opened, synchronize, reopened] jobs: - run-tests: + run-unit-tests: runs-on: ubuntu-latest steps: - name: checkout action diff --git a/README.md b/README.md index c6cd5c4..4e8458b 100644 --- a/README.md +++ b/README.md @@ -50,19 +50,15 @@ jobs: You can change the location of the report metadata file by using the optional `scanMetadataReportFile` input: ```yaml -uses: sonarsource/sonarqube-scan-action@master +uses: sonarsource/sonarqube-quality-gate-action@master with: scanMetadataReportFile: target/sonar/report-task.txt ``` -### Secrets +### Environment variables - `SONAR_TOKEN` – **Required** – this token is used to authenticate access to SonarQube. You can read more about security tokens [here](https://docs.sonarqube.org/latest/user-guide/user-token/). You need to set the `SONAR_TOKEN` environment variable in the "Secrets" settings page of your repository. -## Pull request analysis example - - - ## Do not use this GitHub action if you are in the following situations * You want to analyze a .NET solution. Read the documentation about our [Scanner for .NET](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-msbuild/). diff --git a/images/SonarQube-analysis-in-Checks.png b/images/SonarQube-analysis-in-Checks.png deleted file mode 100644 index b566d6e..0000000 Binary files a/images/SonarQube-analysis-in-Checks.png and /dev/null differ diff --git a/script/check-quality-gate.sh b/script/check-quality-gate.sh index f774b7f..2b3108f 100755 --- a/script/check-quality-gate.sh +++ b/script/check-quality-gate.sh @@ -27,7 +27,7 @@ status="$(jq -r '.task.status' <<< "$task")" until [[ ${status} != "PENDING" && ${status} != "IN_PROGRESS" ]]; do printf '.' - sleep 1 + sleep 5s task="$(curl --silent --fail --show-error --user ${SONAR_TOKEN}: ${ceTaskUrl})" status="$(jq -r '.task.status' <<< "$task")" done