Dependency updater #47
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
name: Dependency updater | |
on: | |
workflow_dispatch: # enable run button on github.com | |
schedule: | |
- cron: "0 18 1,15 * *" # On the 1st and 15th of the month at 18:00. | |
jobs: | |
update: | |
name: Update dependencies | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }} | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
cache: "npm" | |
cache-dependency-path: "./package-lock.json" | |
- name: Update dependencies | |
run: npx npm-check-updates -u | |
- name: Install dependencies, build, and test | |
run: npm install | |
- name: Build site | |
run: npm run test | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.PUSH_TOKEN }} | |
commit-message: Update dependencies | |
committer: GitHub <noreply@github.com> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
branch: dependencies | |
delete-branch: true | |
title: "Update NPM dependencies" | |
body: | | |
Updated NPM dependencies via [GitHub Action](https://github.com/jsnmrs/aggro/actions/workflows/dep-dude.yml) |