-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add workflow to update Browserlist database on push
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Update Browserslist database | ||
on: [push] | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Configure git | ||
run: | | ||
# Setup for commiting using built-in token. See https://github.com/actions/checkout#push-a-commit-using-the-built-in-token | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
- run: npm install | ||
- name: Update Browserslist database and create PR if applies | ||
uses: c2corg/browserslist-update-action@v2 | ||
with: | ||
commit_message: 'chore: update Browserslist db' | ||
title: 'Update Browserslist database' | ||
body: Auto-generated by `.github/workflows/browserslist.yml` using c2corg/browserslist-update-action | ||
labels: 'dependencies,fast tracked,process,size/XS' | ||
reviewers: 'doamatto' | ||
|