[ci] Restrict chromatic workflow to version-bump-* PRs and manual triggers (#5167)

- Remove automatic trigger on push to main
- Add workflow_dispatch for manual triggering
- Add conditional to only run for PRs from version-bump-* branches
- Reduces unnecessary Chromatic builds on regular PRs

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
snomiao
2025-08-24 02:23:27 +08:00
committed by GitHub
parent c75255327a
commit 5cc916bf9f

View File

@@ -3,14 +3,15 @@ name: 'Chromatic'
# - [Automate Chromatic with GitHub Actions • Chromatic docs]( https://www.chromatic.com/docs/github-actions/ )
on:
push:
branches: [main]
workflow_dispatch: # Allow manual triggering
pull_request:
branches: [main]
jobs:
chromatic-deployment:
runs-on: ubuntu-latest
# Only run for PRs from version-bump-* branches or manual triggers
if: github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'version-bump-')
permissions:
pull-requests: write
issues: write