Test comment workflow triggers #144
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GPU tests | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
issue_comment: | |
types: [created] | |
workflow_dispatch: | |
jobs: | |
run: | |
if: "github.repository_owner == 'explosion' && (contains(github.event.comment.body, 'please test gpu') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check user for team affiliation | |
uses: tspascoal/get-user-teams-membership@v2 | |
id: teamAffiliation | |
with: | |
GITHUB_TOKEN: ${{ secrets.ORG_READ_PAT }} | |
username: ${{ github.actor }} | |
team: explosion/spacy | |
- name: Stop workflow if user is no member | |
if: ${{ steps.teamAffiliation.outputs.isTeamMember == false }} | |
run: | | |
echo "You have no rights to trigger this job." | |
exit 1 | |
- name: Trigger buildkite build | |
uses: buildkite/[email protected] | |
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 }} |