name: Update Browserslist
on:
  schedule:
    - cron: '0 7 * * 1'
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: npx browserslist@latest --update-db
      - name: Commit changes
        uses: EndBug/add-and-commit@v9
        with:
          author_name: ${{ github.actor }}
          author_email: ${{ github.actor }}@users.noreply.github.com
          message: 'chore: update browsers list'
