Skip to content

Update samples from CocoaPods #5395

Update samples from CocoaPods

Update samples from CocoaPods #5395

Workflow file for this run

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Update samples from CocoaPods
on:
schedule:
- cron: '0 12 * * *'
repository_dispatch:
types: [ pod-sync ]
workflow_dispatch:
jobs:
check_pod_try:
# The type of runner that the job will run on
runs-on: macos-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout maps-sdk-for-ios-samples
uses: actions/checkout@v2
# Set up Ruby
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7' # pod try breaks with Ruby 3.0
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
# Install CocoaPods v 1.6.1. Need to use this version since there are issues with running `pod try` on later versions
- name: Install CocoaPods 1.6.1
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: 1.6.1
# Install CocoaPods v 1.6.1. Need to use this version since there are issues with running `pod try` on later versions
- name: Update CocoaPod Repo
run: |
pod repo update
# Copy pod try GoogleMaps Objective-C to current copy
- name: Copy pod try GoogleMaps Objective-C changes into current copy
run: |
$GITHUB_WORKSPACE/copy_pod_try.sh GoogleMaps $GITHUB_WORKSPACE/GoogleMaps 1
# Copy pod try GoogleMaps Swift to current copy
- name: Copy pod try GoogleMaps Swift changes into current copy
run: |
mkdir -p $GITHUB_WORKSPACE/GoogleMaps-Swift
$GITHUB_WORKSPACE/copy_pod_try.sh GoogleMaps $GITHUB_WORKSPACE/GoogleMaps-Swift 2
# Copy pod try GooglePlaces Objective-C to current copy
- name: Copy pod try GooglePlaces Objective-C changes into current copy
run: |
mkdir -p $GITHUB_WORKSPACE/GooglePlaces-Swift
$GITHUB_WORKSPACE/copy_pod_try.sh GooglePlaces $GITHUB_WORKSPACE/GooglePlaces 1
# Copy pod try GooglePlaces Swift to current copy
- name: Copy pod try GooglePlaces Swift changes into current copy
run: |
mkdir -p $GITHUB_WORKSPACE/GooglePlaces-Swift
$GITHUB_WORKSPACE/copy_pod_try.sh GooglePlaces $GITHUB_WORKSPACE/GooglePlaces-Swift 2
# Copy pod try GoogleNavigation Objective-C to current copy
- name: Copy pod try GoogleNavigation Objective-C changes into current copy
run: |
mkdir -p $GITHUB_WORKSPACE/GoogleNavigation
$GITHUB_WORKSPACE/copy_pod_try.sh GoogleNavigation $GITHUB_WORKSPACE/GoogleNavigation 1
# Copy pod try GoogleNavigation Swift to current copy
- name: Copy pod try GoogleNavigation Swift changes into current copy
id: pod_try_copy
run: |
mkdir -p $GITHUB_WORKSPACE/GoogleNavigation-Swift
$GITHUB_WORKSPACE/copy_pod_try.sh GoogleNavigation $GITHUB_WORKSPACE/GoogleNavigation-Swift 2
echo "::set-output name=filtered_lines_modified::$(git status | grep "modified" | grep -v "pbxproj" | wc -l)"
# Commit changes
- name: PR Changes
uses: peter-evans/create-pull-request@v6
if: steps.pod_try_copy.outputs.filtered_lines_modified > 0
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
commit-message: 'chore: Update Maps, Places and Navigation samples from CocoaPods'
committer: googlemaps-bot <[email protected]>
author: googlemaps-bot <[email protected]>
title: 'chore: Update Maps, Places and Navigation samples from CocoaPods'
body: |
Pulling in changes from `pod try GoogleMaps`, `pod try GooglePlaces` and `pod try GoogleNavigation`.
**Note:** Make sure to update CocoaPods (Podfile) dependencies
branch: googlemaps-bot/update_samples