Skip to content

feat(Masthead, Mainnav, SystemBanner): fluid prop to disable max-widt… #81

feat(Masthead, Mainnav, SystemBanner): fluid prop to disable max-widt…

feat(Masthead, Mainnav, SystemBanner): fluid prop to disable max-widt… #81

Workflow file for this run

name: "Chromatic"
permissions:
contents: read
on:
push:
branches:
- master # Workflow runs on pushes to the main branch
pull_request:
types: [opened, reopened, synchronize]
jobs:
pr-chromatic:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [22.18.0]
if: >
${{ github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[run-chromatic]') }}
steps:
- name: Check if actor is repo admin
id: permission
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN}}
ACTOR: ${{ github.actor }}
REPO: ${{ github.repository }}
run: |
PERMISSION=$(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GH_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$REPO/collaborators/$ACTOR/permission \
| jq -r '.permission')
echo "Actor permission: $PERMISSION"
if [[ "$PERMISSION" != "admin" ]]; then
echo "❌ Actor is not an admin"
exit 1
fi
echo "✅ Actor is admin"
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
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 }}
- name: Verify checkout
run: |
echo ">>>>GitHub Event Pull Request Head SHA: ${{ github.event.pull_request.head.ref }}"
echo ">>>>Checked out commit: $(git rev-parse HEAD)"
- uses: pnpm/action-setup@v4
- name: Install dependencies
# ⚠️ See your package manager's documentation for the correct command to install dependencies in a CI
run: pnpm install
- name: Run Chromatic
uses: chromaui/action@latest
with:
# ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: true
exitZeroOnChanges: false
skip: "dependabot/**"
master-chromatic:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [22.18.0]
if: >
${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[run-chromatic]') }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- name: Install dependencies
# ⚠️ See your package manager's documentation for the correct command to install dependencies in a CI environment.
run: pnpm install
- name: Run Chromatic
uses: chromaui/action@latest
with:
# ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: true
exitZeroOnChanges: false
skip: "dependabot/**"