Skip to content

disable chromatic if PR has "disabe-chromatic" label #7566

disable chromatic if PR has "disabe-chromatic" label

disable chromatic if PR has "disabe-chromatic" label #7566

Workflow file for this run

name: Chromatic
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
chromatic:
if: ${{ (!startsWith(github.ref, 'refs/heads/dependabot/') || !startsWith(github.triggering_actor, 'dependabot')) && !contains(github.event.pull_request.labels.*.name, 'disabe-chromatic ')}}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js v20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build packages
run: npm run build
- name: Build Storybook
run: npm run chromatic-build
- name: Publish to Chromatic
uses: chromaui/action@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBuildDir: 'public'
exitOnceUploaded: true
onlyChanged: true
externals: |
'.storybook/public/**'
'packages/design-tokens/**'
'packages/icons/**'