Merge pull request #1139 from hackclub/add-script-to-update-caniuse

Create caniuse-update.yml
This commit is contained in:
Max Wofford 2024-03-27 15:14:37 +00:00 committed by GitHub
commit f721383a5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

32
.github/caniuse-update.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Update Browserslist database
on:
workflow_dispatch:
schedule:
- cron: '0 2 1,15 * *'
permissions:
contents: write
pull-requests: write
jobs:
update-browserslist-database:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure git
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
- name: Update Browserslist database and create PR if applies
uses: c2corg/browserslist-update-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: browserslist-update
base_branch: main
commit_message: 'build: update Browserslist db'
title: 'build: update Browserslist db'
body: Auto-generated by [browserslist-update-action](https://github.com/c2corg/browserslist-update-action/). Caniuse database has been updated. Review changes, merge this PR, and be merry.