From b36053b70f94fc3e30c35a3516f1e6812b6443e5 Mon Sep 17 00:00:00 2001 From: ethriel3695 Date: Thu, 5 Dec 2024 09:30:51 -0700 Subject: [PATCH] update the code snippet to accurately reflect our recommendations --- src/content/ci/github-actions.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/content/ci/github-actions.mdx b/src/content/ci/github-actions.mdx index 784cfeae..8223b2a3 100644 --- a/src/content/ci/github-actions.mdx +++ b/src/content/ci/github-actions.mdx @@ -513,6 +513,10 @@ If you decide to use the `pull_request` event, we recommend creating a separate fetch-depth: 0 # 👇 Tells the checkout which commit hash to reference ref: ${{ github.event.pull_request.head.ref }} + env: + CHROMATIC_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }} + CHROMATIC_SHA: ${{ github.event.pull_request.head.sha || github.ref }} + CHROMATIC_SLUG: ${{ github.repository }} ``` ### UI Test and UI Review