Dependencies #137
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: Dependencies | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "00 20 * * *" | |
jobs: | |
checks: | |
name: 'Update' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: npm install | |
run: | | |
npm install | |
npm list | |
- name: tsc build | |
run: npm run tools | |
- name: Update dependency | |
id: update | |
run: node ./dist/tools/dependency.js | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.JAYLYBOT_TOKEN }} | |
push-to-fork: jayly-bot/ScriptAPI | |
commit-message: Update package.json and package-lock.json | |
title: Update npm packages | |
body: Updated NPM packages in package.json, please review. | |
branch: dependency/update | |
base: main | |
author: jayly-bot <121162959+jayly-bot@users.noreply.github.com> | |
- name: Check outputs | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | |
gh pr edit ${{ steps.cpr.outputs.pull-request-number }} --add-label "dependencies" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PULL_REQUEST: ${{ steps.cpr.outputs.pull-request-url }} |