-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (77 loc) · 3.38 KB
/
make_pr.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
name: iOS / Android アプリリポジトリにプルリクエストを作成する
on:
push:
branches:
- main
jobs:
make_pr:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- uses: gradle/gradle-build-action@v2
- name: Android アプリリポジトリチェックアウト
uses: actions/checkout@v3
with:
repository: tfandkusu/ga913-android
token: ${{ secrets.MY_PERSONAL_ACCESS_TOKEN }}
path: ga913-android
- name: iOS アプリリポジトリチェックアウト
uses: actions/checkout@v3
with:
repository: tfandkusu/ga913-ios
token: ${{ secrets.MY_PERSONAL_ACCESS_TOKEN }}
path: ga913-ios
- name: Android 向けイベントクラスと iOS 向けイベント構造体を作成
run: ./gradlew run --args make
- name: Android アプリのフォーマット整え
run: ./gradlew ktlintFormat
working-directory: ga913-android
- name: Android アプリリポジトリにコミット
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git checkout -b update_analytics_event_class
git add .
git commit -m "Analytics イベントクラスを更新"
working-directory: ga913-android
continue-on-error: true
- name: Android アプリリポジトリにプッシュ
run: git push -f origin update_analytics_event_class
working-directory: ga913-android
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.MY_PERSONAL_ACCESS_TOKEN }}
- name: Android アプリリポジトリにプルリクエストを作成する
run: gh pr create --title "[自動生成]Analytics イベントクラスを更新" --body "Analytics イベントクラスが自動生成されました。問題が無ければマージしてください。" --base main
continue-on-error: true
working-directory: ga913-android
env:
GH_TOKEN: ${{ secrets.MY_PERSONAL_ACCESS_TOKEN }}
- name: iOS アプリリポジトリにコミット
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git checkout -b update_analytics_event_struct
git add .
git commit -m "Analytics イベント構造体を更新"
working-directory: ga913-ios
continue-on-error: true
- name: iOS アプリリポジトリにプッシュ
run: git push -f origin update_analytics_event_struct
working-directory: ga913-ios
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.MY_PERSONAL_ACCESS_TOKEN }}
- name: iOS アプリリポジトリにプルリクエストを作成する
run: gh pr create --title "[自動生成]Analytics イベント構造体を更新" --body "Analytics イベント構造体が自動生成されました。問題が無ければマージしてください。" --base main
continue-on-error: true # すでにあれば作成しない
working-directory: ga913-ios
env:
GH_TOKEN: ${{ secrets.MY_PERSONAL_ACCESS_TOKEN }}