From 353c33417cec51cf1f04e35156b6c7b5f065aaf9 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 28 Dec 2023 17:16:43 -0500 Subject: [PATCH 1/6] Update chromatic.yml --- .github/workflows/chromatic.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 9f07329ef..36ea455b7 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -1,9 +1,13 @@ -name: "Chromatic Publish" +name: Chromatic -on: workflow_dispatch +on: + workflow_dispatch: + pull_request_review: + types: [submitted] jobs: test: + if: github.event.action == "workflow_dispatch" || (github.event.action == "pull_request_review" && github.event.review.state == "approved") runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 From dbc29b6b9e328e551768f15522676eb44ffb2acb Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:29:11 -0500 Subject: [PATCH 2/6] change to apostrophes --- .github/workflows/chromatic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 36ea455b7..43943d8e9 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -7,7 +7,7 @@ on: jobs: test: - if: github.event.action == "workflow_dispatch" || (github.event.action == "pull_request_review" && github.event.review.state == "approved") + if: github.event.action == 'workflow_dispatch' || (github.event.action == 'pull_request_review' && github.event.review.state == 'approved') runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 From af8ea01113e73b73bdc5658ca6e4bc8e1118e866 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:33:36 -0500 Subject: [PATCH 3/6] temporarily disable, print trigger event string --- .github/workflows/chromatic.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 43943d8e9..f349ab773 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -7,11 +7,13 @@ on: jobs: test: - if: github.event.action == 'workflow_dispatch' || (github.event.action == 'pull_request_review' && github.event.review.state == 'approved') + # if: github.event.action == 'workflow_dispatch' || (github.event.action == 'pull_request_review' && github.event.review.state == 'approved') runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - run: npm ci + - run: | + echo "${{ github.event.action }}" + npm ci - uses: chromaui/action@v1 with: projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} From d21d264b6d2b74940e53307b3f71e084e1f0ccf8 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:35:19 -0500 Subject: [PATCH 4/6] isolate echo --- .github/workflows/chromatic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index f349ab773..505cb79cc 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v1 - run: | echo "${{ github.event.action }}" - npm ci + # npm ci - uses: chromaui/action@v1 with: projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} From 5e8dc8e08a18c5faea5a4dd92ad54ff2a043ffe7 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:37:29 -0500 Subject: [PATCH 5/6] try different context --- .github/workflows/chromatic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 505cb79cc..15c218314 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v1 - run: | - echo "${{ github.event.action }}" + echo "${{ github.event_name }}" # npm ci - uses: chromaui/action@v1 with: From 62460fa17d4f4fe8e3b3de483e1f20674bef21ef Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:38:51 -0500 Subject: [PATCH 6/6] restore fixed version --- .github/workflows/chromatic.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 15c218314..09b74deac 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -7,13 +7,11 @@ on: jobs: test: - # if: github.event.action == 'workflow_dispatch' || (github.event.action == 'pull_request_review' && github.event.review.state == 'approved') + if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - run: | - echo "${{ github.event_name }}" - # npm ci + - run: npm ci - uses: chromaui/action@v1 with: projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}