Skip to content

Commit cc65f04

Browse files
authored
chore(ci): add support for spectrum-two baselines and snapshots (#4070)
1 parent 2a4fb8c commit cc65f04

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

.github/workflows/development.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ jobs:
202202
uses: ./.github/workflows/vrt.yml
203203
with:
204204
skip: ${{ contains(github.event.pull_request.labels.*.name, 'skip_vrt') }}
205+
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
206+
sha: ${{ github.event.pull_request.head.sha || github.ref }}
205207
secrets: inherit
206208

207209
# -------------------------------------------------------------

.github/workflows/production.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353
uses: ./.github/workflows/vrt.yml
5454
with:
5555
skip: ${{ github.base_ref != 'main' }}
56+
ref: ${{ github.ref_name }}
57+
sha: ${{ github.ref }}
5658
secrets: inherit
5759

5860
# -------------------------------------------------------------

.github/workflows/vrt.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ on:
1515
required: false
1616
type: boolean
1717
default: false
18+
ref:
19+
description: "Branch to test"
20+
required: false
21+
type: string
22+
default: ${{ github.ref }}
23+
sha:
24+
description: "SHA to test"
25+
required: false
26+
type: string
27+
default: ${{ github.ref }}
1828
outputs:
1929
storybook-url:
2030
description: "URL of the published Storybook"
@@ -37,6 +47,11 @@ jobs:
3747
uses: actions/checkout@v4
3848
with:
3949
fetch-depth: 0
50+
ref: ${{ inputs.ref || github.ref }}
51+
env:
52+
CHROMATIC_BRANCH: ${{ inputs.ref || github.ref_name }}
53+
CHROMATIC_SHA: ${{ inputs.sha || github.ref }}
54+
CHROMATIC_SLUG: ${{ github.repository }}
4055

4156
- name: Use Node LTS version
4257
uses: actions/setup-node@v4
@@ -79,7 +94,6 @@ jobs:
7994
onlyChanged: true
8095
traceChanged: true
8196
untraced: ".github/* plugins/stylelint-*/* tools/* .changeset/*"
82-
diagnostics: true
8397
autoAcceptChanges: "main"
8498
# Lets VRT pass without running so as not to waste snapshots
8599
skip: ${{ inputs.skip }}

0 commit comments

Comments
 (0)