Explicitly allow cache-write for test invocations

The `gradle-build-action` test workflows need to write cache entries,
even when run on non-default branches. This change add explicit configuration
to set `cache-read-only: false` when cache writing is required.
This commit is contained in:
Daz DeBoer 2022-06-04 11:37:13 -06:00
parent b02f4f1968
commit 00cdd4dcf9
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
10 changed files with 22 additions and 0 deletions

View file

@ -32,6 +32,8 @@ jobs:
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
- name: Groovy build with configuration-cache enabled
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test --configuration-cache
@ -102,6 +104,8 @@ jobs:
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
- name: Execute 'help' with configuration-cache enabled
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew help --configuration-cache
@ -121,6 +125,8 @@ jobs:
uses: ./.github/actions/download-dist
- name: Setup Gradle
uses: ./
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
- name: Execute 'test' with configuration-cache enabled
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew test --configuration-cache