---
name: "Schedule: Sync labels"

on: # yamllint disable-line rule:truthy
  workflow_dispatch:
  schedule:
    - cron: "0 * * * *"

jobs:
  labels:
    name: Sync Labels
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3
        with:
          token: ${{ secrets.BOT_TOKEN }}

      - name: Sync Labels
        uses: EndBug/label-sync@da00f2c11fdb78e4fae44adac2fdd713778ea3e8 # v2
        with:
          config-file: |
            https://raw.githubusercontent.com/truecharts/.github/main/.github/labels.yaml
          token: "${{ secrets.BOT_TOKEN }}"
          delete-other-labels: true
