From 5cc916bf9f167413646dc36d3e9a9af9c017d952 Mon Sep 17 00:00:00 2001 From: snomiao Date: Sun, 24 Aug 2025 02:23:27 +0800 Subject: [PATCH] [ci] Restrict chromatic workflow to version-bump-* PRs and manual triggers (#5167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .github/workflows/chromatic.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chromatic.yaml b/.github/workflows/chromatic.yaml index 03bfbc1f5b..11ac26254e 100644 --- a/.github/workflows/chromatic.yaml +++ b/.github/workflows/chromatic.yaml @@ -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