-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): add a weekly dependency bump workflow
- Loading branch information
1 parent
f939438
commit f701465
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# This workflow requires a personal access token for uirouterbot | ||
name: Weekly Dependency Bumps | ||
on: | ||
schedule: | ||
- cron: '18 22 * * 6' | ||
|
||
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/[email protected] | ||
with: | ||
exclude: ${{ 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/v2.7.0 | ||
uses: peter-evans/create-pull-request@340e629d2f63059fb3e3f15437e92cfbc7acd85b | ||
with: | ||
token: ${{ secrets.UIROUTERBOT_PAT }} | ||
request-to-parent: true | ||
branch-suffix: 'random' | ||
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/[email protected] | ||
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'] | ||
}); |