From 590ec3bf23a5cc9e299540ca724212a5c44d25f1 Mon Sep 17 00:00:00 2001 From: zomars Date: Tue, 26 Jul 2022 10:19:53 -0600 Subject: [PATCH] Update check-if-ui-has-changed.yml --- .github/workflows/check-if-ui-has-changed.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-if-ui-has-changed.yml b/.github/workflows/check-if-ui-has-changed.yml index cc371b74e2..469109d6ae 100644 --- a/.github/workflows/check-if-ui-has-changed.yml +++ b/.github/workflows/check-if-ui-has-changed.yml @@ -4,7 +4,14 @@ name: 'Chromatic' # Event for the workflow -on: push +on: + pull_request_target: # So we can test on forks + branches: + - main + paths: + - apps/storybook/** + - packages/ui/** + workflow_dispatch: # List of jobs jobs: @@ -38,7 +45,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 with: - fetch-depth: 0 # 👈 Required to retrieve git history + ref: ${{ github.event.pull_request.head.sha }} # So we can test on forks + fetch-depth: 2 - name: Install dependencies run: yarn # 👇 Adds Chromatic as a step in the workflow