Cron Update Next #20367
This file contains hidden or 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: Cron Update Next | |
on: | |
# Allow manual runs | |
workflow_dispatch: | |
# Run every 10 minutes https://crontab.guru/every-10-minutes | |
schedule: | |
- cron: '*/10 * * * *' | |
jobs: | |
create-pull-request: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# 0 means fetch all commits so we can commit and push in the script below | |
with: | |
fetch-depth: 0 | |
- name: Install latest corepack | |
run: npm install -g corepack@latest | |
- name: Enable corepack | |
run: corepack enable pnpm | |
- name: Create Pull Request | |
uses: actions/github-script@v7 | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }} | |
# See https://github.com/actions/github-script#run-a-separate-file-with-an-async-function | |
with: | |
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }} | |
script: | | |
const script = require('./utils/update-next.js') | |
await script({ github, context, tag: 'canary' }) |