-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up workflow to auto upgrade dependencies
- Loading branch information
1 parent
69ace1d
commit 4358cf6
Showing
1 changed file
with
36 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,36 @@ | ||
name: Upgrade Dependencies | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '42 0 * * 0' | ||
|
||
jobs: | ||
upgrade: | ||
name: Upgrade Dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v2 | ||
env: | ||
CACHE_NAME: cache-node-modules | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ hashFiles('**/yarn.lock', '**/package-lock.json') }} | ||
|
||
- name: Upgrade dependencies | ||
run: yarn upgrade | ||
|
||
- name: Run linter | ||
run: yarn lint | ||
|
||
- name: Commit changes | ||
run: | | ||
git config --global user.name 'Upgrade Dependencies Workflow' | ||
git config --global user.email '<>' | ||
git add yarn.lock | ||
git commit -m "Upgrade Dependencies $(date -u)" || true | ||
git push |