forked from vercel/vercel
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 977 Bytes
/
cron-update-next.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Cron Update Next
on:
# Allow manual runs
workflow_dispatch:
# Run every 4 hours https://crontab.guru/every-4-hours
schedule:
- cron: '0 */4 * * *'
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: 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 })