Skip to content

Commit

Permalink
Set up workflow to auto upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinovantes committed Jun 15, 2021
1 parent 69ace1d commit 4358cf6
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/upgrade.yml
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

0 comments on commit 4358cf6

Please sign in to comment.