Skip to content

Commit

Permalink
SQCPPGHA-8 Upgrade all recommended GitHub Action versions
Browse files Browse the repository at this point in the history
  • Loading branch information
7PH authored and michael-jabbour-sonarsource committed Sep 12, 2024
1 parent 6a732c9 commit 5fdf7f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Install sonar-scanner and build-wrapper
uses: sonarsource/sonarqube-github-c-cpp@v1
uses: sonarsource/sonarqube-github-c-cpp@v2
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_ROOT_CERT: ${{ secrets.SONAR_ROOT_CERT }}
Expand All @@ -78,23 +78,23 @@ If you are using SonarQube 10.5 or earlier, use `sonar.cfamily.build-wrapper-out
You can change the `build-wrapper` and `sonar-scanner` installation path by using the optional input `installation-path` like this:

```yaml
uses: sonarsource/sonarqube-github-c-cpp@v1
uses: sonarsource/sonarqube-github-c-cpp@v2
with:
installation-path: my/custom/directory/path
```
Also, the absolute paths to the installed build-wrapper and sonar-scanner binaries are returned as outputs from the action.

Moreover, by default the action will cache sonar-scanner installation. However, you can disable caching by using the optional input: `cache-binaries` like this:
```yaml
uses: sonarsource/sonarqube-github-c-cpp@v1
uses: sonarsource/sonarqube-github-c-cpp@v2
with:
cache-binaries: false
```

If your SonarQube server uses a self-signed certificate, you can pass a root certificate (in PEM format) to the java certificate store:

```yaml
uses: sonarsource/sonarqube-github-c-cpp@v1
uses: sonarsource/sonarqube-github-c-cpp@v2
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ runs:
- name: Cache sonar-scanner installation
id: cache-sonar-tools
if: inputs.cache-binaries == 'true'
uses: actions/cache@v3
uses: actions/cache@v4
env:
# The default value is 60mins. Reaching timeout is treated the same as a cache miss.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
Expand Down

0 comments on commit 5fdf7f7

Please sign in to comment.