name: GPU tests

on:
#  schedule:
#    - cron: "0 0 * * *"
  issue_comment:
    types: [created]
  workflow_dispatch:
  pull_request:
    types: [ labeled, opened, synchronize, reopened ]

jobs:
  run:
    if: "github.repository_owner == 'explosion' && (contains(github.event.pull_request.labels.*.name, 'Test GPU') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')"
    runs-on: ubuntu-latest

    steps:

      - name: Trigger buildkite build
        uses: buildkite/trigger-pipeline-action@v1.2.0
        env:
          PIPELINE: explosion-ai/spacy-llm-gpu-tests
          BRANCH: main
          MESSAGE: ":github: spacy-llm GPU tests - triggered from a GitHub Action"
          BUILDKITE_API_ACCESS_TOKEN: ${{ secrets.BUILDKITE_SECRET }}
