-
Notifications
You must be signed in to change notification settings - Fork 136
63 lines (59 loc) · 2.5 KB
/
update_dependencies.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
# This workflow requires a personal access token for uirouterbot
name: Weekly Dependency Bumps
on:
repository_dispatch:
types: [update_dependencies]
schedule:
- cron: '0 20 * * 0'
jobs:
upgrade-dependencies:
runs-on: ubuntu-latest
name: Update dependencies
strategy:
matrix:
excludes: ['']
deptype: ['dependencies', 'devDependencies']
latest: [false]
steps:
- uses: actions/checkout@v2
- run: |
git config user.name uirouterbot
git config user.password ${{ secrets.UIROUTERBOT_PAT }}
git remote set-url origin $(git remote get-url origin | sed -e 's/ui-router/uirouterbot/')
git fetch --unshallow -p origin
- name: Update dependencies
id: upgrade
uses: ui-router/publish-scripts/actions/upgrade@actions-upgrade-v1.0.3
with:
excludes: ${{ matrix.excludes }}
deptype: ${{ matrix.deptype }}
latest: ${{ matrix.latest }}
- name: Create Pull Request
id: cpr
if: ${{ steps.upgrade.outputs.upgrades != '' }}
# the following hash is from https://github.com/peter-evans/create-pull-request/releases/tag/v3.8.2
uses: peter-evans/create-pull-request@052fc72b4198ba9fbc81b818c6e1859f747d49a8
with:
token: ${{ secrets.UIROUTERBOT_PAT }}
branch: 'update-${{ matrix.deptype }}'
commit-message: 'chore(package): Update ${{ steps.upgrade.outputs.upgradecount }} ${{ matrix.deptype }} to ${{ steps.upgrade.outputs.upgradestrategy }}'
title: 'chore(package): Update ${{ steps.upgrade.outputs.upgradecount }} ${{ matrix.deptype }} to ${{ steps.upgrade.outputs.upgradestrategy }}'
body: |
chore(package): Update ${{ steps.upgrade.outputs.upgradecount }} ${{ matrix.deptype }} to ${{ steps.upgrade.outputs.upgradestrategy }}
```
${{ steps.upgrade.outputs.upgrades }}
```
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
- name: Apply Merge Label
if: ${{ steps.cpr.outputs.pr_number != '' }}
uses: actions/github-script@0.9.0
with:
github-token: ${{ secrets.UIROUTERBOT_PAT }}
script: |
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ steps.cpr.outputs.pr_number }},
labels: ['ready to squash and merge']
});