mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
ci(workflow): accept repository_dispatch and let manual triggers run on the fork
- repository_dispatch (event_type: dbx-monitor) provides an external trigger for price-drift alerting to kick off a check - the job guard previously allowed only workflow_dispatch on the fork, which would have skipped repository_dispatch runs; now only the schedule event is pinned to upstream so cron never races, while both manual trigger types run on either repo
This commit is contained in:
parent
9bb64b1120
commit
56d7dff551
1 changed files with 6 additions and 3 deletions
|
|
@ -9,6 +9,9 @@ on:
|
|||
schedule:
|
||||
- cron: "0 2 * * *" # daily 02:00 UTC
|
||||
workflow_dispatch:
|
||||
# external trigger: POST /repos/<owner>/<repo>/dispatches {"event_type":"dbx-monitor"}
|
||||
repository_dispatch:
|
||||
types: [dbx-monitor]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
|
@ -22,9 +25,9 @@ env:
|
|||
|
||||
jobs:
|
||||
monitor-db-pricing:
|
||||
# once merged the cron fires on both repos; upstream owns the schedule,
|
||||
# the fork stays dispatch-only so the two never race on the same base
|
||||
if: github.repository == 'BerriAI/litellm' || github.event_name == 'workflow_dispatch'
|
||||
# the merged cron fires on both repos; upstream owns the schedule so the
|
||||
# two never race on the same base. manual triggers run on either repo.
|
||||
if: github.event_name != 'schedule' || github.repository == 'BerriAI/litellm'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue