2024-05-03 00:55:00 +02:00
|
|
|
name: Update Font Data
|
2023-08-07 02:11:03 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
# Run every every day at midnight https://crontab.guru/#0_0_*_*_*/1
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * */1'
|
|
|
|
# Allow manual runs
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2023-08-07 02:14:35 +02:00
|
|
|
env:
|
2023-10-16 23:41:38 +02:00
|
|
|
NODE_LTS_VERSION: 20
|
2023-08-07 02:14:35 +02:00
|
|
|
|
2023-08-07 02:11:03 +02:00
|
|
|
jobs:
|
|
|
|
create-pull-request:
|
|
|
|
runs-on: ubuntu-latest
|
2023-10-21 09:50:36 +02:00
|
|
|
if: github.repository_owner == 'vercel'
|
2023-08-07 02:11:03 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-02-01 22:13:29 +01:00
|
|
|
uses: actions/checkout@v4
|
2023-08-07 02:11:03 +02:00
|
|
|
with:
|
|
|
|
# Commits made with the default `GITHUB_TOKEN` won't trigger workflows.
|
|
|
|
# See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
|
|
|
|
token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
|
|
|
|
|
2023-08-07 02:14:35 +02:00
|
|
|
- name: Setup node
|
2024-02-04 23:06:28 +01:00
|
|
|
uses: actions/setup-node@v4
|
2023-08-07 02:14:35 +02:00
|
|
|
with:
|
|
|
|
node-version: ${{ env.NODE_LTS_VERSION }}
|
|
|
|
check-latest: true
|
|
|
|
|
|
|
|
- run: corepack enable
|
|
|
|
|
2023-08-07 02:11:03 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
shell: bash
|
|
|
|
run: pnpm i
|
|
|
|
|
|
|
|
- name: Create Pull Request
|
|
|
|
shell: bash
|
2023-10-31 03:06:48 +01:00
|
|
|
run: node scripts/automated-update-workflow.js
|
2023-08-07 02:11:03 +02:00
|
|
|
env:
|
2023-08-08 00:07:50 +02:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
|
2023-10-31 03:06:48 +01:00
|
|
|
BRANCH_NAME: fonts-data
|
|
|
|
SCRIPT: scripts/update-google-fonts.js
|
|
|
|
PR_TITLE: Update font data
|
|
|
|
PR_BODY: This auto-generated PR updates font data with latest available
|