.github/workflows/Update Yonode Package.yml #5
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 Yonode Package | |
on: | |
schedule: | |
# Runs every day at 05:00 UTC | |
- cron: '*/5 * * * *' | |
workflow_dispatch: | |
jobs: | |
update-yonode: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Change directory to yonode | |
run: cd packages/yonode-templates/JS-MongoDB-Mongoose-Auth-Template | |
- name: Install npm-check-updates | |
run: npm install -g npm-check-updates | |
- name: Update package.json if newer versions are available | |
run: | | |
ncu -u | |
- name: Create Pull Request for updated package.json | |
id: cpr | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
commit-message: Update dependencies in Yonode | |
title: 'Update Yonode dependencies' | |
body: 'This pull request updates dependencies for the Yonode package.' | |
branch: 'update-yonode-dependencies' | |
base: 'main' | |
labels: 'dependencies' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check outputs | |
run: echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" |