feat(web): keep browserslist updated

This commit is contained in:
Collin Barrett 2025-06-28 10:53:08 -05:00 committed by Collin Barrett
parent 1de78c53ad
commit ec365f1b70
2 changed files with 62 additions and 9 deletions

View file

@ -0,0 +1,55 @@
name: "Web - Update Browserslist"
on:
workflow_dispatch:
schedule:
- cron: "0 21 * * 5" # Fridays at 4pm Memphis (America/Chicago)
push:
branches:
- main
paths:
- ".github/workflows/web-browserslist-updater.yml"
permissions:
contents: write
pull-requests: write
jobs:
update-browserslist:
strategy:
matrix:
branch: [main, next]
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Install dependencies
run: npm install
- name: Run Browserslist DB update
run: npx update-browserslist-db@latest
- name: Check for changes
id: git-check
run: |
git diff --quiet || echo "changes=true" >> "$GITHUB_OUTPUT"
- name: Create Pull Request
if: steps.git-check.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: npx update-browserslist-db@latest"
branch: "chore/browserslist-update-${{ github.run_id }}-${{ matrix.branch }}"
base: ${{ matrix.branch }}
delete-branch: true
title: "chore: update browserslist db (${{ matrix.branch }})"

View file

@ -4,6 +4,11 @@ on:
workflow_dispatch:
schedule:
- cron: "0 21 * * 5" # Fridays at 4pm Memphis (America/Chicago)
push:
branches:
- main
paths:
- ".github/workflows/web-shadcn-updater.yml"
permissions:
contents: write
@ -55,14 +60,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: update shadcn/ui components"
title: "Update shadcn/ui Components"
body: |
This pull request contains the latest updates for the shadcn/ui components.
The following components have been updated:
```
$(cat web/shadcn-updates.txt)
```
branch: "chore/shadcn-updates"
title: "Update shadcn/ui components"
branch: "chore/shadcn-updates-${{ github.run_id }}"
base: "next"
delete-branch: true