name: Update copyright year in license file

on:
  schedule:
    - cron: '0 3 1 1 *'
  workflow_dispatch:

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - name: Clone project
        uses: actions/checkout@v3

      - name: Update license year
        uses: p3lim/license-year-updater@v1
        with:
          files: LICENSE.txt

      - name: Create pull request
        uses: peter-evans/create-pull-request@v4
        with:
          title: Update license
          body:
          commit-message: Update license
          branch: update-license
          delete-branch: true
