Update dependencies #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update dependencies | |
on: | |
workflow_dispatch: | |
inputs: | |
dependencies-content: | |
description: The content of dependencies | |
required: true | |
type: string | |
jobs: | |
update-dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Update dependencies | |
id: dep | |
uses: AgoraIO-Extensions/actions/.github/actions/dep@main | |
with: | |
github-token: ${{ secrets.GH_TOKEN }} | |
dependencies-content: ${{ inputs.dependencies-content }} | |
target-files: | | |
android/build.gradle | |
example/ios/Podfile | |
react-native-agora.podspec | |
- name: Update example | |
run: | | |
yarn pod-install example/ios | |
- name: Create pull request | |
uses: AgoraIO-Extensions/actions/.github/actions/pr@main | |
with: | |
github-token: ${{ secrets.GH_TOKEN }} | |
target-repo: ${{ github.workspace }} | |
target-branch: ${{ github.ref_name }} | |
target-branch-name-surffix: dep-update | |
pull-request-title: | | |
[AUTO] Update dependencies | |
pull-request-body: | | |
Dependencies content: | |
${{ steps.dep.outputs.matches }} | |
update-pod: | |
runs-on: macos-latest | |
needs: update-dependencies | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref_name }}-dep-update | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Cache cocoapods | |
id: cocoapods-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
**/ios/Pods | |
key: ${{ runner.os }}-cocoapods-0-${{ hashFiles('example/ios/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cocoapods-0- | |
- name: Update Podfile.lock | |
run: | | |
pod update | |
working-directory: example/ios | |
- name: Commit changes | |
run: | | |
git config --global user.email "${{ secrets.GIT_EMAIL }}" | |
git config --global user.name "${{ secrets.GIT_USERNAME }}" | |
git add example | |
git commit -m "chore(example): update Podfile.lock by new dependencies" | |
git push |