Skip to content

Commit dc144ae

Browse files
authored
Configure Gradle Remote Cache (#1603)
1 parent 0697876 commit dc144ae

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/gradle.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,17 @@ jobs:
3030
uses: gradle/gradle-build-action@v2
3131
with:
3232
arguments: check
33+
env:
34+
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
35+
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
3336
- name: Run Build
3437
if: github.event_name == 'push'
3538
id: build
3639
uses: gradle/gradle-build-action@v2
3740
env:
3841
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
42+
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
43+
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
3944
with:
4045
arguments: build
4146
- name: Publish Test Report

settings.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ gradleEnterprise {
1515
}
1616
}
1717

18+
buildCache {
19+
local { enabled = System.getenv('CI') != 'true' }
20+
remote(HttpBuildCache) {
21+
push = System.getenv('CI') == 'true'
22+
enabled = true
23+
url = 'https://ge.grails.org/cache/'
24+
credentials {
25+
username = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER')
26+
password = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY')
27+
}
28+
}}
29+
30+
1831
include ("grails-datastore-core",
1932
"grails-datastore-web",
2033

0 commit comments

Comments
 (0)