From e26d595231e9059f60d6464cb43971a7d9c9dad0 Mon Sep 17 00:00:00 2001 From: Rishi Balakrishnan Date: Fri, 17 Jul 2026 08:56:03 -0400 Subject: [PATCH] ci: install pinned CocoaPods 1.16.2 instead of asserting runner version (#128) --- .github/workflows/build-submit-ios.yml | 12 ++++++++---- .github/workflows/bundle-deploy-eas-update.yml | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-submit-ios.yml b/.github/workflows/build-submit-ios.yml index 89fddbecd..e67e8183b 100644 --- a/.github/workflows/build-submit-ios.yml +++ b/.github/workflows/build-submit-ios.yml @@ -85,14 +85,18 @@ jobs: with: xcode-version: "26.4" - - name: ☕️ Assert Cocoapods version + - name: ☕️ Pin Cocoapods version run: | + # Must match the COCOAPODS stamp in ios/Podfile.lock; the runner image's + # preinstalled version drifts (https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md) EXPECTED=1.16.2 + if [ "$(pod --version)" != "$EXPECTED" ]; then + sudo gem uninstall cocoapods --all --executables --ignore-dependencies + sudo gem install cocoapods -v "$EXPECTED" --no-document + fi ACTUAL=$(pod --version) if [ "$ACTUAL" != "$EXPECTED" ]; then - echo "Expected Cocoapods $EXPECTED but runner has $ACTUAL." - echo "The version ships preinstalled with the macOS runner image: https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md" - echo "If the runner image changed, update EXPECTED here or reinstall the pinned version." + echo "Expected Cocoapods $EXPECTED but runner has $ACTUAL after pinning." exit 1 fi diff --git a/.github/workflows/bundle-deploy-eas-update.yml b/.github/workflows/bundle-deploy-eas-update.yml index 6dbe1ad58..3fd4b2c18 100644 --- a/.github/workflows/bundle-deploy-eas-update.yml +++ b/.github/workflows/bundle-deploy-eas-update.yml @@ -200,14 +200,18 @@ jobs: with: xcode-version: "26.4" - - name: ☕️ Assert Cocoapods version + - name: ☕️ Pin Cocoapods version run: | + # Must match the COCOAPODS stamp in ios/Podfile.lock; the runner image's + # preinstalled version drifts (https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md) EXPECTED=1.16.2 + if [ "$(pod --version)" != "$EXPECTED" ]; then + sudo gem uninstall cocoapods --all --executables --ignore-dependencies + sudo gem install cocoapods -v "$EXPECTED" --no-document + fi ACTUAL=$(pod --version) if [ "$ACTUAL" != "$EXPECTED" ]; then - echo "Expected Cocoapods $EXPECTED but runner has $ACTUAL." - echo "The version ships preinstalled with the macOS runner image: https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md" - echo "If the runner image changed, update EXPECTED here or reinstall the pinned version." + echo "Expected Cocoapods $EXPECTED but runner has $ACTUAL after pinning." exit 1 fi -- knotmirror 0.0.1