Skip to content

Checkout correct ref #11

Checkout correct ref

Checkout correct ref #11

Workflow file for this run

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' || '' }}
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
with:
ref: ${{ github.event.pull_request_target.head.sha || github.ref }}
- 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 "Hello from master!"
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request_target.head.sha || github.ref }}