name: Trigger Deb Repo
on:
  release:
    types: [published]
jobs:
  trigger-deb-repo:
    runs-on: ubuntu-latest
    steps:
      - env:
          GITHUB_TOKEN: ${{ secrets.GT_Token }}  # 操作 deb 仓库的 PAT
        run: |
          curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \
          -H "Accept: application/vnd.github+json" \
          https://api.github.com/repos/nxtrace/nexttrace-debs/actions/workflows/build.yaml/dispatches \
          -d '{"ref": "main", "inputs": {"tag": "${{ github.event.release.tag_name }}"}}'
