-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore(ci): fix iOS builds hanging on Github Actions #6854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fbc0a0e
1495fcd
420b7c2
c8c1d24
9213840
5008e1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,9 @@ platform :ios do | |
| create_keychain( | ||
| name: ENV["MATCH_KEYCHAIN_NAME"], | ||
| password: ENV["MATCH_KEYCHAIN_PASSWORD"], | ||
| timeout: 1200 | ||
| timeout: 0, | ||
| lock_when_sleeps: false, | ||
| unlock: true | ||
| ) | ||
| end | ||
|
|
||
|
|
@@ -54,11 +56,16 @@ platform :ios do | |
| key_filepath: 'fastlane/app_store_connect_api_key.p8', | ||
| in_house: false | ||
| ) | ||
| match(type: "appstore") | ||
| get_provisioning_profile(app_identifier: "chat.rocket.reactnative.ShareExtension") | ||
| get_provisioning_profile(app_identifier: "chat.rocket.reactnative.NotificationService") | ||
| get_provisioning_profile(app_identifier: "chat.rocket.reactnative.watchkitapp") | ||
| match(type: "appstore", platform: "ios") | ||
| get_provisioning_profile(app_identifier: "chat.rocket.reactnative.ShareExtension", platform: "ios") | ||
| get_provisioning_profile(app_identifier: "chat.rocket.reactnative.NotificationService", platform: "ios") | ||
| get_provisioning_profile(app_identifier: "chat.rocket.reactnative.watchkitapp", platform: "ios") | ||
| # pem(api_key: api_key) # still uses Spaceship http://docs.fastlane.tools/actions/pem/#how-does-it-work | ||
| # Allow codesign to access keys without prompting | ||
| keychain_path = "~/Library/Keychains/#{ENV['MATCH_KEYCHAIN_NAME']}-db" | ||
| sh "security unlock-keychain -p \"#{ENV['MATCH_KEYCHAIN_PASSWORD']}\" #{keychain_path}" | ||
| sh "security set-keychain-settings -lut 3600 #{keychain_path}" | ||
| sh "security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k \"#{ENV['MATCH_KEYCHAIN_PASSWORD']}\" #{keychain_path}" | ||
|
Comment on lines
+64
to
+68
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat -n ios/fastlane/Fastfile | sed -n '60,100p'Repository: RocketChat/Rocket.Chat.ReactNative Length of output: 2382 Add error suppression to line 68 for consistency with The 🤖 Prompt for AI Agents |
||
| gym( | ||
| scheme: "RocketChatRN", | ||
| workspace: "RocketChatRN.xcworkspace", | ||
|
|
@@ -72,11 +79,18 @@ platform :ios do | |
|
|
||
| match( | ||
| type: "appstore", | ||
| platform: "ios", | ||
| app_identifier: ["chat.rocket.ios", "chat.rocket.ios.NotificationService", "chat.rocket.ios.Rocket-Chat-ShareExtension", "chat.rocket.ios.watchkitapp"], | ||
| readonly: true, | ||
| output_path: './' | ||
| ) | ||
|
|
||
| # Allow codesign to access keys without prompting | ||
| keychain_path = "~/Library/Keychains/#{ENV['MATCH_KEYCHAIN_NAME']}-db" | ||
| sh "security unlock-keychain -p \"#{ENV['MATCH_KEYCHAIN_PASSWORD']}\" #{keychain_path}" | ||
| sh "security set-keychain-settings -lut 3600 #{keychain_path}" | ||
| sh "security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k \"#{ENV['MATCH_KEYCHAIN_PASSWORD']}\" #{keychain_path} || true" | ||
|
|
||
| update_code_signing_settings( | ||
| profile_name: "match AppStore chat.rocket.ios.NotificationService", | ||
| build_configurations: "Release", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify timeout inconsistency between keychain creation and later shell commands.
The keychain is created with
timeout: 0(no automatic lock), but lines 67 and 91 later usesecurity set-keychain-settings -lut 3600which sets a 3600-second timeout. This creates conflicting timeout configurations.Consider either:
timeout: 3600here to match the shell commands, or-lut 3600flag from lines 67 and 91 to maintain the no-timeout behaviorcreate_keychain( name: ENV["MATCH_KEYCHAIN_NAME"], password: ENV["MATCH_KEYCHAIN_PASSWORD"], - timeout: 0, + timeout: 3600, lock_when_sleeps: false, unlock: true )📝 Committable suggestion
🤖 Prompt for AI Agents