-
Notifications
You must be signed in to change notification settings - Fork 226
84 lines (72 loc) · 2.32 KB
/
dep.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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