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

add update_dependencies job #125

Merged
merged 6 commits into from
May 23, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/update_dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Update_Dependencies

on:
push:
branches:
- cron_update_pacakges
schedule:
- cron: 0 15 * * *

jobs:
update_dependencies:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
ref: master
- uses: subosito/flutter-action@v1
with:
channel: 'beta'

# See: https://pub.dev/packages/pubspec_update
# 公式で yarn upgrade --latest 相当のことができるコマンドが用意されてないので、サードパーティの package を使う
- run: pub global activate pubspec_update
- 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
- name: edit pubspec.yaml
run: |
# NOTE: pubspec_update は「^」で管理するため。本当は package に PR 送るのが望ましい。
sed -i -e 's/\^//' pubspec.yaml
- name: create PR
uses: peter-evans/create-pull-request@v2
env:
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with:
commit-message: '[Scheduled] update dependencies'
title: '[Scheduled] update dependencies'
body: |
Auto-generated by [create-pull-request][1]

[1]: https://github.com/peter-evans/create-pull-request
branch: cron_update_dependencies
base: master