| name: Update Node.js Versions | |
| on: | |
| # Trigger manually in the UI | |
| workflow_dispatch: | |
| schedule: | |
| # run at 01:30 UTC daily | |
| - cron: "30 1 * * *" | |
| permissions: | |
| contents: read | |
| jobs: | |
| updateNodejsVersions: | |
| runs-on: ubuntu-latest | |
| # Skip this on forks | |
| if: github.repository == 'bazel-contrib/rules_nodejs' | |
| steps: | |
| - name: Git Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: "14.x" | |
| - uses: pnpm/action-setup@v4 | |
| - run: npm run update-nodejs-versions | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v3 | |
| with: | |
| token: ${{ secrets.PAT }} | |
| commit-message: Update Node.js Versions | |
| title: Update Node.js Versions | |
| body: | | |
| - Updated Node.js Versions using `npm run update-nodejs-versions` | |
| Auto-generated by [create-pull-request][1] | |
| [1]: https://github.com/peter-evans/create-pull-request | |
| branch: update-nodejs-versions |