Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
types: [labeled, synchronize]

jobs:
pre-chromatic:
if: (github.event_name == 'push' || github.event.pull_request.draft == false) && github.actor != 'dependabot[bot]'
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'ui')
runs-on: ubuntu-latest
steps:
- id: gen_url
run: |
# Use commit hash instead of branch name to avoid 37-character limit
URL=https://${{ github.sha }}--675790d317ba346348aa3490.chromatic.com
echo "url=$URL" >> $GITHUB_OUTPUT
outputs:
url: ${{ steps.gen_url.outputs.url }}

chromatic:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
if: (github.event_name == 'push' || github.event.pull_request.draft == false) && github.actor != 'dependabot[bot]'
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'ui')
environment:
name: chromatic
url: ${{ needs.pre-chromatic.outputs.url }}
runs-on: ubuntu-latest
needs: pre-chromatic
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- uses: oven-sh/setup-bun@v2
- run: bun install
- uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: true
env:
CHROMATIC_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
CHROMATIC_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
CHROMATIC_SLUG: ${{ github.repository }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}