From 5e773e485b81b00455c80cc75f88d63c0f043816 Mon Sep 17 00:00:00 2001 From: Kayla Firestack Date: Fri, 19 Jan 2024 08:11:19 -0500 Subject: [PATCH] feat(gh/actions/chromatic): require label for automatic chromatic runs (#2368) * feat(gh/actions/chromatic): allow running Chromatic CI manually The Chromatic build hasn't been run since we ran out of snapshots, and it's now behind and causing a few issues with snapshots. By allowing this action to be run manually, we can use the CI to update * fix(gh/actions/chromatic): require `chromatic` label on PR's, only run automatically on PR's --------- Co-authored-by: Josh Larson --- .github/workflows/chromatic.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index dd90eb541..056bce0dd 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -1,10 +1,21 @@ name: "Chromatic" -on: push +on: + workflow_dispatch: + pull_request: + types: + - synchronize + - labeled + push: + branches: + - main + jobs: chromatic: runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'chromatic') }} + steps: - name: Checkout code uses: actions/checkout@v4