diff --git a/.github/actions/browserslist-update/action.yml b/.github/actions/browserslist-update/action.yml new file mode 100644 index 0000000000000..28fe56bee93b3 --- /dev/null +++ b/.github/actions/browserslist-update/action.yml @@ -0,0 +1,32 @@ +name: Update Browserslist database + +on: + schedule: + - cron: '0 0 5,15,25 * *' + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + update-browserslist-database: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Configure git + run: | + # Setup for committing 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: Update Browserslist database and create PR if applies + uses: c2corg/browserslist-update-action@v2 + with: + 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/)' + labels: 'dependencies, automerge'