name: Update copyright list
on:
  push:
    branches:
      - '**'
jobs:
  copyrights:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Check
      run: |
        ./tools/check_copyrights.sh
    - uses: peter-evans/create-pull-request@v7
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        branch: update-copyright-list-${{ github.ref_name }}
        delete-branch: true
        commit-message: 'Update copyright list in license'
        title: 'Update copyright list in license'
        author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
