This repository has been archived by the owner on Jul 14, 2024. It is now read-only.
Update Dependencies #3
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: Update Dependencies | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 1 * *' | |
jobs: | |
update_dependencies: | |
name: Update Dependencies | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Determine Yarn Cache Directory | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- name: Cache node_modules | |
uses: actions/cache@v4 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Update Dependencies | |
run: | | |
yarn global add npm-check-updates | |
ncu -u | |
yarn install | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: 'build: update dependencies to the latest version' | |
title: 'Update dependencies to the latest version' | |
branch: 'update/dependencies' |