File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,13 @@ import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest
1212import io.github.typesafegithub.workflows.domain.RunnerType.Windows2022
1313import io.github.typesafegithub.workflows.domain.triggers.PullRequest
1414import io.github.typesafegithub.workflows.domain.triggers.Push
15+ import io.github.typesafegithub.workflows.dsl.expressions.Contexts
1516import io.github.typesafegithub.workflows.dsl.expressions.expr
1617import io.github.typesafegithub.workflows.dsl.workflow
1718import io.github.typesafegithub.workflows.yaml.writeToFile
1819
20+ val GRADLE_ENCRYPTION_KEY by Contexts .secrets
21+
1922@OptIn(ExperimentalClientSideBindings ::class )
2023workflow(
2124 name = " Build" ,
@@ -32,7 +35,9 @@ workflow(
3235 ) {
3336 uses(action = Checkout ())
3437 setupJava()
35- uses(action = ActionsSetupGradle ())
38+ uses(action = ActionsSetupGradle (
39+ cacheEncryptionKey = expr { GRADLE_ENCRYPTION_KEY },
40+ ))
3641 run (
3742 name = " Build" ,
3843 command = " ./gradlew build" ,
Original file line number Diff line number Diff line change 4040 distribution : ' zulu'
4141 - id : ' step-2'
4242 uses : ' gradle/actions/setup-gradle@v3'
43+ with :
44+ cache-encryption-key : ' ${{ secrets.GRADLE_ENCRYPTION_KEY }}'
4345 - id : ' step-3'
4446 name : ' Build'
4547 run : ' ./gradlew build'
5860 distribution : ' zulu'
5961 - id : ' step-2'
6062 uses : ' gradle/actions/setup-gradle@v3'
63+ with :
64+ cache-encryption-key : ' ${{ secrets.GRADLE_ENCRYPTION_KEY }}'
6165 - id : ' step-3'
6266 name : ' Build'
6367 run : ' ./gradlew build'
You can’t perform that action at this time.
0 commit comments