From bac57acdd0dd3d867bcabf33e268d385e8e27bd2 Mon Sep 17 00:00:00 2001 From: Ed Jones <8016457+ed-jones@users.noreply.github.com> Date: Thu, 16 Mar 2023 18:57:04 +1100 Subject: [PATCH] build: :construction_worker: fix chromatic workflow on forked repos --- .github/workflows/chromatic.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 1ccb286..b3d7be8 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -12,13 +12,17 @@ jobs: # Operating System runs-on: ubuntu-latest # Job steps + env: + HAS_CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} steps: - uses: actions/checkout@v1 - name: Install dependencies + if: ${{ env.HAS_CHROMATIC_PROJECT_TOKEN }} # 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm run: yarn # 👇 Adds Chromatic as a step in the workflow - name: Publish to Chromatic + if: ${{ env.HAS_CHROMATIC_PROJECT_TOKEN }} uses: chromaui/action@v1 # Chromatic GitHub Action options with: