Weekly maintenance/update tasks #4
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: Weekly maintenance/update tasks | |
on: | |
# workflow_dispatch allows for manual triggering of the workflow | |
# Useful for testing that it works without waiting on the cron schedule. | |
workflow_dispatch: | |
schedule: | |
# https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule | |
# ┌─────────── minute (0 - 59) | |
# │ ┌───────── hour (0 - 23) | |
# │ │ ┌─────── day of the month (1 - 31) | |
# │ │ │ ┌───── month (1 - 12 or JAN-DEC) | |
# │ │ │ │ ┌─── day of the week (0 - 6 or SUN-SAT) | |
# v v v v v | |
- cron: 30 7 * * 1 # in UTC | |
# Run on Mondays @ 7:30am UTC (3:30am EDT, 12:30 am PDT) | |
jobs: | |
update-browserslist: | |
name: Update the browserslist database (used by caniuse-lite) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install & cache node_modules | |
uses: ./.github/actions/shared-node-cache | |
with: | |
node-version: ${{ matrix.node-version }} | |
ssh-private-key: ${{ secrets.KHAN_ACTIONS_BOT_SSH_PRIVATE_KEY }} | |
- name: Update browserslist DB | |
run: npx update-browserslist-db@latest | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 | |
with: | |
token: ${{ secrets.KHAN_ACTIONS_BOT_TOKEN }} | |
team-reviewers: perseus, frontend-infra-web | |
commit-message: "chore: update browserslist" | |
title: Update browserslist | |
body: | | |
# Summary | |
Updates the `browserslist` and `caniuse-lite` npm packages | |
## Reviewing notes: | |
There should only be changes to the `yarn.lock` file in | |
this PR. Check that there is only 1 `caniuse-lite` package | |
reference in the `yarn.lock` file (the intent of this | |
update is to ensure that `caniuse-lite` is on the latest | |
version and that there aren't multiple, conflicting | |
versions that different tools might see). | |
If everything looks fine, please approve this PR and then | |
land it (either with the Big Green Merge Button ™️ or by | |
using `git land <this pr #>` in a terminal). |