fix(ci): slightly update workflow trigger (#2966)

We want to avoid re-triggering the workflow when random other labels are
added (e.g., `meta-cla`, etc.) Also no point restarting the workflow
when someone _unlabels_.
This commit is contained in:
Ashwin Bharambe 2025-07-30 12:04:13 -07:00 committed by GitHub
parent 026caa5551
commit 266e2afb9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,7 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
types: [opened, synchronize, reopened, labeled, unlabeled]
types: [opened, synchronize, labeled]
paths:
- 'llama_stack/**'
- 'tests/**'
@ -33,11 +33,15 @@ on:
default: 'ollama'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}-${{ contains(github.event.pull_request.labels.*.name, 're-record-tests') && 'rerecord' || 'replay' }}
cancel-in-progress: true
jobs:
discover-tests:
if: |
github.event.action == 'opened' ||
github.event.action == 'synchronize' ||
(github.event.action == 'labeled' && contains(github.event.pull_request.labels.*.name, 're-record-tests'))
runs-on: ubuntu-latest
outputs:
test-types: ${{ steps.generate-test-types.outputs.test-types }}