feat: Add concurrency limits to trigger workflows

Add max 3 concurrent run limits:
- GitHub Actions: concurrency groups prevent workflow queue buildup
- trigger-server: tracks concurrent runs, rejects with 429 if at max
- Configurable via MAX_CONCURRENT env var (defaults to 3)
- Returns running count and max in trigger response

This prevents resource exhaustion when workflows trigger frequently.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Sprite 2026-02-08 19:34:52 +00:00
parent bdf4e08cc7
commit 286609c1ed
3 changed files with 32 additions and 8 deletions

View file

@ -5,6 +5,10 @@ on:
- cron: '*/30 * * * *'
workflow_dispatch:
concurrency:
group: improve-sprite-trigger
cancel-in-progress: false
jobs:
trigger:
runs-on: ubuntu-latest

View file

@ -7,6 +7,10 @@ on:
types: [opened, reopened]
workflow_dispatch:
concurrency:
group: refactor-sprite-trigger
cancel-in-progress: false
jobs:
trigger:
runs-on: ubuntu-latest