feat!: Replace bearer with cookie-based authentication #410
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors | |
# SPDX-License-Identifier: CC0-1.0 | |
name: 'Storybook' | |
on: | |
pull_request: | |
branches: ['**'] | |
paths: | |
- 'frontend/**' | |
- '.github/workflows/storybook.yml' | |
push: | |
branches: ['main'] | |
paths: | |
- 'frontend/**' | |
- '.github/workflows/storybook.yml' | |
jobs: | |
chromatic: | |
runs-on: ubuntu-latest | |
if: github.actor != 'dependabot[bot]' | |
concurrency: | |
# prettier-ignore | |
group: chromatic-${{ github.event_name }}-${{ github.event.pull_request.number }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Find Storybook comment on PR | |
if: github.event_name == 'pull_request' | |
uses: peter-evans/find-comment@v3 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: Storybook | |
- name: Create or update Storybook comment on PR | |
if: github.event_name == 'pull_request' | |
uses: peter-evans/create-or-update-comment@v4 | |
id: cc | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
<hr> | |
A Storybook preview is currently being built for commit ${{ github.sha }}. | |
As soon as it becomes available, this comment will be updated. | |
edit-mode: append | |
- name: Install dependencies | |
run: npm ci | |
working-directory: ./frontend | |
- name: Run Chromatic | |
id: chromatic | |
uses: chromaui/action@latest | |
with: | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
workingDir: ./frontend | |
- name: Create or update Storybook comment on PR | |
if: github.event_name == 'pull_request' | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
comment-id: ${{ steps.cc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
A Storybook preview is available for commit ${{ github.sha }}. | |
[View Storybook](${{ steps.chromatic.outputs.storybookUrl }}) | |
[View Chromatic build](${{ steps.chromatic.outputs.buildUrl }}) | |
edit-mode: replace |