Skip to content

Chromatic: fall back to NO environment? #5

Chromatic: fall back to NO environment?

Chromatic: fall back to NO environment? #5

Workflow file for this run

# Trigger CI
name: Chromatic Storybook deployment
on:
push:
branches:
- "master"
pull_request_target:
types: [synchronize, labeled, unlabeled]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
authorize:
environment:
${{ github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository &&
'external' || 'foobar' }}
runs-on: ubuntu-22.04
steps:
- run: echo "true"
files-changed:
name: Check which files changed
needs: [authorize]
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
frontend_all: ${{ steps.changes.outputs.frontend_all }}
steps:
- uses: actions/checkout@v3
- name: Test which files changed
uses: dorny/[email protected]
id: changes
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: .github/file-paths.yaml
fe-chromatic:
needs: [authorize, files-changed]
if: contains(github.event.pull_request_target.labels.*.name, 'chromatic') || (github.ref_name == 'master' && needs.files-changed.outputs.frontend_all == 'true')
runs-on: ubuntu-22.04
steps:
- run: |
echo ${{ contains(github.event.pull_request_target.labels.*.name, 'chromatic') }}
echo ${{ github.ref_name == 'master' }}
echo ${{ needs.files-changed.outputs.frontend_all == 'true' }}