Skip to content

Commit e613b9b

Browse files
committed
fix: update CocoaPods cache restoration to use specs and clear stale trunk
1 parent dccdd39 commit e613b9b

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/actions/setup-e2e-env/action.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,22 @@ runs:
329329
run: sudo xcode-select -s "/Applications/Xcode_$XCODE_VERSION.app"
330330
shell: bash
331331

332-
- name: Restore CocoaPods Pods cache
332+
- name: Restore CocoaPods specs cache
333333
if: ${{ inputs.platform == 'ios' }}
334+
id: cocoapods-specs-cache
334335
uses: actions/cache@v4
335336
with:
336-
path: ios/Pods
337-
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }}
337+
path: ~/.cocoapods/repos
338+
key: ${{ runner.os }}-cocoapods-specs-${{ hashFiles('ios/Podfile.lock') }}
339+
restore-keys: |
340+
${{ runner.os }}-cocoapods-specs-
338341
continue-on-error: true # Don't fail if cache restoration has issues
339342

343+
- name: Clear CocoaPods trunk to prevent stale specs
344+
if: ${{ inputs.platform == 'ios' }}
345+
run: pod repo remove trunk || true
346+
shell: bash
347+
340348
# Install CocoaPods w/ cached bundler environment
341349
- name: Install CocoaPods via bundler
342350
if: ${{ inputs.platform == 'ios'}}

0 commit comments

Comments
 (0)