Fix Gradle cache save races when restore hits a fallback key.

Save always uses the job scope key; do not reuse cache-primary-key from a partial restore (e.g. Android saving build-jar).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-14 16:11:33 +03:00
Unverified
parent 3416bc2b0e
commit 7d7e78c534
3 changed files with 12 additions and 12 deletions
+6 -6
View File
@@ -119,7 +119,7 @@ jobs:
- uses: ./.github/actions/save-gradle-build-cache
if: always()
with:
primary-key: ${{ steps.gradle-build-cache.outputs.cache-primary-key }}
scope: ${{ steps.gradle-build-cache.outputs.cache-save-scope }}
- uses: actions/upload-artifact@v5
with:
name: desktop-proguard
@@ -170,7 +170,7 @@ jobs:
- uses: ./.github/actions/save-gradle-build-cache
if: always()
with:
primary-key: ${{ steps.gradle-build-cache.outputs.cache-primary-key }}
scope: ${{ steps.gradle-build-cache.outputs.cache-save-scope }}
windows-package:
name: Windows (${{ matrix.label }})
@@ -246,7 +246,7 @@ jobs:
- uses: ./.github/actions/save-gradle-build-cache
if: always()
with:
primary-key: ${{ steps.gradle-build-cache.outputs.cache-primary-key }}
scope: ${{ steps.gradle-build-cache.outputs.cache-save-scope }}
macos:
name: macOS (${{ matrix.label }})
@@ -316,7 +316,7 @@ jobs:
- uses: ./.github/actions/save-gradle-build-cache
if: always()
with:
primary-key: ${{ steps.gradle-build-cache.outputs.cache-primary-key }}
scope: ${{ steps.gradle-build-cache.outputs.cache-save-scope }}
linux:
name: Linux (${{ matrix.label }})
@@ -382,7 +382,7 @@ jobs:
- uses: ./.github/actions/save-gradle-build-cache
if: always()
with:
primary-key: ${{ steps.gradle-build-cache.outputs.cache-primary-key }}
scope: ${{ steps.gradle-build-cache.outputs.cache-save-scope }}
android:
name: Android
@@ -441,7 +441,7 @@ jobs:
- uses: ./.github/actions/save-gradle-build-cache
if: always()
with:
primary-key: ${{ steps.gradle-build-cache.outputs.cache-primary-key }}
scope: ${{ steps.gradle-build-cache.outputs.cache-save-scope }}
- name: Stage APK
run: |
mkdir -p release-staging