ci: 添加Gradle缓存、node_modules缓存和Docker构建缓存
Some checks failed
Frontend CI / ota-android (push) Successful in 14m5s
Frontend CI / build-android-apk (push) Successful in 51m52s
Frontend CI / build-and-push-web (push) Failing after 9m50s

This commit is contained in:
lafay
2026-03-21 14:15:41 +08:00
parent 37ddfa8ed6
commit 25071d2303

View File

@@ -104,6 +104,7 @@ jobs:
NODE_ENV: "production"
NDK_NUM_JOBS: "4"
CMAKE_BUILD_PARALLEL_LEVEL: "4"
GRADLE_USER_HOME: /root/.gradle
permissions:
contents: read
steps:
@@ -122,7 +123,28 @@ jobs:
node-version: '25.6.1'
cache: 'npm'
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.android/build-cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache node_modules
uses: actions/cache@v4
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Generate Android native project
@@ -292,6 +314,8 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
provenance: false
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Show image tags
run: |