diff --git a/.github/workflows/verify_chromatic.yml b/.github/workflows/verify_chromatic.yml index 18511b936d..0c9f110b4c 100644 --- a/.github/workflows/verify_chromatic.yml +++ b/.github/workflows/verify_chromatic.yml @@ -5,7 +5,7 @@ on: push: branches: - master - pull_request_target: + pull_request: paths: - '.github/workflows/verify_chromatic.yml' - '.storybook/**' @@ -31,8 +31,6 @@ jobs: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - # For pull_request_target, we need to check out the PR branch - ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }} fetch-depth: 10000 # Required to retrieve git history - name: Use node.js ${{ matrix.node-version }} @@ -65,7 +63,7 @@ jobs: packages/ui/src/**/*.css - name: Prepare Chromatic Message - if: github.event_name == 'pull_request_target' && steps.chromatic.outputs.url + if: github.event_name == 'pull_request' && steps.chromatic.outputs.url id: prepare-message run: | if [ "${{ steps.chromatic.outputs.changeCount }}" = "0" ] || [ -z "${{ steps.chromatic.outputs.changeCount }}" ]; then @@ -75,7 +73,7 @@ jobs: fi - name: Post Chromatic Link in PR Comment - if: github.event_name == 'pull_request_target' && steps.chromatic.outputs.url + if: github.event_name == 'pull_request' && steps.chromatic.outputs.url uses: mshick/add-pr-comment@v2 with: message: |