Skip to content

Change to on push

Change to on push #133

Workflow file for this run

name: "Chromatic"
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-chromatic
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
changed-files:
runs-on: ubuntu-latest
name: changed-files
outputs:
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
webapp/src/app/**

Check failure on line 29 in .github/workflows/chromatic.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/chromatic.yml

Invalid workflow file

You have an error in your yaml syntax on line 29
webapp/.storybook/**
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
ANY_CHANGED: ${{ steps.changed-files.outputs.any_changed }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
echo Did any files change: ${ANY_CHANGED}
done
chromatic:
name: Run Chromatic
runs-on: ubuntu-latest
needs: [changed-files]
if: ${{ needs.changed-files.outputs.any_changed == 'true' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
cache: npm
cache-dependency-path: ./package.json
node-version: 22
- name: Install dependencies
working-directory: ./webapp
run: npm install
- name: Run Chromatic
id: chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
autoAcceptChanges: "develop"
workingDir: webapp
exitZeroOnChanges: true
exitOnceUploaded: true
onlyChanged: true
skip: "dependabot/**"
- name: Publish Summary
run: echo -e "| Results | |\n| --- | --- |\n| Build Results | ${{ steps.chromatic.outputs.buildUrl }} |\n| Storybook Preview | ${{ steps.chromatic.outputs.storybookUrl }} |\n| Component Count | ${{steps.chromatic.outputs.componentCount}} |" >> $GITHUB_STEP_SUMMARY