Skip to content

Commit 17a09c0

Browse files
Allow writing to cache from main and develop
1 parent 0919be9 commit 17a09c0

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
java-version: 17
2525
- name: Setup Gradle
2626
uses: gradle/actions/setup-gradle@v5
27+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
2728
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
2829
- name: Assemble
2930
run: ./gradlew assembleRelease --configuration-cache

.github/workflows/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
java-version: 17
3636
- name: Setup Gradle
3737
uses: gradle/actions/setup-gradle@v5
38+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
3839
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3940
- name: Build API documentation with Dokka
4041
run: ./gradlew ui:dokkaGeneratePublicationHtml --configuration-cache

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
java-version: 17
4242
- name: Setup Gradle
4343
uses: gradle/actions/setup-gradle@v5
44+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
4445
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
4546
- name: Publish package
4647
run: ./gradlew publish --configuration-cache

0 commit comments

Comments
 (0)