Skip to content

Commit

Permalink
Merge pull request #17 from tfandkusu/make_pr
Browse files Browse the repository at this point in the history
Android アプリへのプルリク作成
  • Loading branch information
tfandkusu authored Aug 12, 2024
2 parents 30493c4 + c885be5 commit bcbc375
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/make_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: make_pr
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: Android アプリ向けイベントクラス作成
run: ./gradlew run --args make
- name: Android アプリのフォーマット整え
run: ./gradlew spotlessApply
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
- name: Android アプリリポジトリにプッシュ
run: git push -f origin update_analytics_event_class
working-directory: ga913-android
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 }}

0 comments on commit bcbc375

Please sign in to comment.