Skip to content

Commit c3bdb52

Browse files
committed
Cache Sonar plugins in workflow
1 parent c8a631e commit c3bdb52

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ jobs:
4848
run: mvn verify -B -"Dgpg.skip"
4949

5050
# doesn't work with PRs from forks, see https://jira.sonarsource.com/browse/MMF-1371
51+
- name: Cache Sonar plugins
52+
if: "${{ (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/') || github.event.pull_request.head.repo.full_name == 'dnsjava/dnsjava') && matrix.arch == 'x64' && matrix.os == 'ubuntu-20.04' && matrix.java == '11' }}"
53+
uses: actions/cache@v2
54+
with:
55+
path: ~/.sonar/cache
56+
key: ${{ runner.os }}-sonar
57+
restore-keys: |
58+
${{ runner.os }}-sonar
59+
5160
- name: Build with Maven and run Sonar
5261
if: "${{ (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/') || github.event.pull_request.head.repo.full_name == 'dnsjava/dnsjava') && matrix.arch == 'x64' && matrix.os == 'ubuntu-20.04' && matrix.java == '11' }}"
5362
env:

0 commit comments

Comments
 (0)