name: Template

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

concurrency:
  group: ${{ github.workflow }}

jobs:
  template:
    name: Template
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Sync Repository
        uses: liblaf/template@main
      - name: Git Commit
        run: |-
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git add --all
          if git commit --message="ci: sync with template repository"; then
            git push
          fi
