From c29f7d0b090e6cac5593feee7b1d4aff3e5444f8 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 23 Sep 2021 16:35:12 +0200 Subject: [PATCH] add blanket handler (will fail) and add workflow yml --- .github/workflows/chromatic-workflow_run.yml | 24 ++++++++++++++++++++ action-src/main.ts | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/chromatic-workflow_run.yml diff --git a/.github/workflows/chromatic-workflow_run.yml b/.github/workflows/chromatic-workflow_run.yml new file mode 100644 index 000000000..8ddda2d2f --- /dev/null +++ b/.github/workflows/chromatic-workflow_run.yml @@ -0,0 +1,24 @@ +name: "Chromatic (workflow_run)" +on: + workflow_run: + workflows: + - "Chromatic (manual)" + types: + - completed + +jobs: + chromatic: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-node@v1 + with: + node-version: '14.x' + - uses: actions/checkout@v1 + - name: install + run: yarn && git status --porcelain + - name: prep package + run: ./scripts/rename.js storybook-chromatic + - name: run chromatic + run: yarn chromatic + env: + CHROMATIC_PROJECT_TOKEN: gcaw1ai2dgo diff --git a/action-src/main.ts b/action-src/main.ts index a388747f7..c66eb2240 100755 --- a/action-src/main.ts +++ b/action-src/main.ts @@ -42,6 +42,10 @@ const getBuildInfo = (event: typeof context) => { slug: repository.full_name, }; } + case 'workflow_run': { + console.log(event.payload); + return {}; + } case 'workflow_dispatch': { const { ref, sha } = event.payload.inputs;