From aae645cb7d4cf00ffd518e1c460122e2153c2dfc Mon Sep 17 00:00:00 2001 From: Matt Ronchetto Date: Mon, 9 Sep 2024 09:47:22 -0700 Subject: [PATCH] chore: add workflow to update Browserlist database on push --- .github/workflows/browserslist.yml | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/browserslist.yml diff --git a/.github/workflows/browserslist.yml b/.github/workflows/browserslist.yml new file mode 100644 index 00000000..2e58a884 --- /dev/null +++ b/.github/workflows/browserslist.yml @@ -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' +