Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

Commit 903b9fb

Browse files
add update_dependencies job (#125)
* add update_dependencies job * fix * fix token * fix token * 動作確認用の trigger を削除
1 parent dc56460 commit 903b9fb

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Update_Dependencies
2+
3+
on:
4+
schedule:
5+
- cron: 0 15 * * *
6+
7+
jobs:
8+
update_dependencies:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 10
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 1
15+
ref: master
16+
- uses: subosito/flutter-action@v1
17+
with:
18+
channel: 'beta'
19+
20+
# See: https://pub.dev/packages/pubspec_update
21+
# 公式で yarn upgrade --latest 相当のことができるコマンドが用意されてないので、サードパーティの package を使う
22+
- run: pub global activate pubspec_update
23+
- run: pub global run pubspec_update:pubspec-update --force # See: https://dart.dev/tools/pub/cmd/pub-global#running-a-script-using-pub-global-run
24+
- name: edit pubspec.yaml
25+
run: |
26+
# NOTE: pubspec_update は「^」で管理するため。本当は package に PR 送るのが望ましい。
27+
sed -i -e 's/\^//' pubspec.yaml
28+
- name: create PR
29+
uses: peter-evans/create-pull-request@v2
30+
with:
31+
commit-message: '[Scheduled] update dependencies'
32+
title: '[Scheduled] update dependencies'
33+
body: |
34+
Auto-generated by [create-pull-request][1]
35+
36+
[1]: https://github.com/peter-evans/create-pull-request
37+
branch: cron_update_dependencies
38+
base: master
39+
token: ${{ secrets.REPO_SCOPED_TOKEN }}

0 commit comments

Comments
 (0)