Weekly Bump Dependencies #94
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: Weekly Bump Dependencies | |
on: | |
schedule: | |
- cron: '0 14 * * 1' | |
workflow_dispatch: | |
env: | |
node_version: "20.x" | |
jobs: | |
Bump: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.node_version }} | |
- name: npm install | |
run: npm install | |
- name: Check outdated dependencies | |
id: outdated | |
run: npm outdated || echo ::set-output name=outdated::1 | |
- name: Bump dependencies | |
if: steps.outdated.outputs.outdated == 1 | |
run: npm update | |
- name: Bump patch version | |
if: steps.outdated.outputs.outdated == 1 | |
run: npm version patch -git-tag-version=false | |
- name: Create (or update) pull request | |
if: steps.outdated.outputs.outdated == 1 | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.GH_ACTIONS_TOKEN }} # Use non-default token so that this PR will trigger CI | |
title: 'chore(deps): bump dependencies' | |
commit-message: 'chore(deps): bump dependencies' | |
body: Created using the [Weekly Bump Dependenciesv](https://github.com/${{ github.repository }}/actions?query=workflow%3A%22Weekly+Bump+Dependencies%22) workflow | |
branch: bump-dependencies | |
labels: | | |
dependencies | |
javascript | |
reviewers: yoshutch |