name: Update Browserslist Database

on:
  schedule:
    - cron: '0 0 * * 0'

permissions:
  contents: write
  pull-requests: write

jobs:
  update-browserslist-database:
    name: Create PR containing Browserslist updates
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Setup Node.js (.nvmrc)
        uses: actions/setup-node@v3
        with:
          node-version-file: '.nvmrc'
          cache: 'npm'

      - name: Configure git
        run: |
          git config --global user.email "actions@github.com"
          git config --global user.name "GitHub Actions"

      - name: Update Browserslist database and create PR if applicable
        uses: c2corg/browserslist-update-action@v2
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: update/browserslist-db
          commit_message: 'Update Browserslist database.'
          title: 'Update Browserslist Database'
          body: Auto-generated by [browserslist-update-action](https://github.com/c2corg/browserslist-update-action/)
          base_branch: develop

name: Update Browserslist Database

on:
  schedule:
    - cron: '0 0 * * 0'

permissions:
  contents: write
  pull-requests: write

jobs:
  update-browserslist-database:
    name: Create PR containing Browserslist updates
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Setup Node.js (.nvmrc)
        uses: actions/setup-node@v3
        with:
          node-version-file: '.nvmrc'
          cache: 'npm'

      - name: Configure git
        run: |
          git config --global user.email "actions@github.com"
          git config --global user.name "GitHub Actions"

      - name: Update Browserslist database and create PR if applicable
        uses: c2corg/browserslist-update-action@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: update/browserslist-db
          commit_message: 'Update Browserslist database.'
          title: 'Update Browserslist Database'
          body: Auto-generated by [browserslist-update-action](https://github.com/c2corg/browserslist-update-action/)
          base_branch: develop

Use v1 of the action.
Use v1 of the action.
