Skip to content

Commit 864119c

Browse files
committed
Migrate Bitrise caching from deprecated branch-based to key-based
Replace deprecated cache-pull@2 and cache-push@2 steps with the new restore-cache@1 and save-cache@1 key-based caching steps. The old branch-based caching steps are being removed by Bitrise on 2025-04-11. - Android workflow: cache node_modules and Gradle caches - iOS (primary) workflow: cache node_modules, CocoaPods, and Pods - Use checksum of example/package.json for cache key generation - Add fallback keys (prefix-only) for partial cache restoration https://claude.ai/code/session_01CdGit4rh88KPWNdwpkSSFL
1 parent 1021acf commit 864119c

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

bitrise.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ workflows:
88
- activate-ssh-key@4:
99
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
1010
- git-clone@8: {}
11-
- cache-pull@2: {}
11+
- restore-cache@1:
12+
inputs:
13+
- key: |-
14+
deps-android-{{ checksum "example/package.json" }}
15+
deps-android-
1216
- avd-manager@2:
1317
inputs:
1418
- tag: default
@@ -30,7 +34,13 @@ workflows:
3034
log\nset -x\n \n# we are building a release device configuration\nyarn
3135
detox build --configuration android.emu.release"
3236
title: Detox Build
33-
- cache-push@2: {}
37+
- save-cache@1:
38+
inputs:
39+
- key: deps-android-{{ checksum "example/package.json" }}
40+
- paths: |-
41+
example/node_modules
42+
~/.gradle/caches
43+
- is_key_unique: 'true'
3444
- wait-for-android-emulator@1: {}
3545
- script@1:
3646
inputs:
@@ -47,7 +57,11 @@ workflows:
4757
- activate-ssh-key@4:
4858
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
4959
- git-clone@8: {}
50-
- cache-pull@2: {}
60+
- restore-cache@1:
61+
inputs:
62+
- key: |-
63+
deps-ios-{{ checksum "example/package.json" }}
64+
deps-ios-
5165
- yarn@2:
5266
inputs:
5367
- workdir: example
@@ -80,9 +94,14 @@ workflows:
8094
log\nset -x\n \n# we are testing a release device configuration\nyarn
8195
detox test --configuration ios.sim.release --cleanup"
8296
title: Detox Test
83-
- cache-push@2:
97+
- save-cache@1:
8498
inputs:
85-
- cache_paths: ''
99+
- key: deps-ios-{{ checksum "example/package.json" }}
100+
- paths: |-
101+
example/node_modules
102+
~/Library/Caches/CocoaPods
103+
example/ios/Pods
104+
- is_key_unique: 'true'
86105
- deploy-to-bitrise-io@2:
87106
inputs:
88107
- deploy_path: example

0 commit comments

Comments
 (0)