Skip to content

Update Browserslist database #17

Update Browserslist database

Update Browserslist database #17

name: Update Browserslist database
on:
schedule:
- cron: '0 6 15 * *' # 06:00 on the 15th of every month
workflow_dispatch: # or via Github UI
permissions:
contents: write
pull-requests: write
jobs:
update-browserslist-database:
runs-on: ubuntu-latest
steps:
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install packages
run: npm ci
- name: Update Browserslist database (old way)
run: npx browserslist@latest --update-db
- name: Rebuild API
run: npm run build-api
- name: Add & commit changes
uses: EndBug/add-and-commit@v9
with:
message: 'ci: update browserslist database'
new_branch: 'ci/update-browserslist'
- name: Create PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create --base "main" --head "ci/update-browserslist" --title "Update browserslist database" --label "ci" --body-file "./.github/workflows/pr-template.md"