You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2022/08/23 20:37:17 UTC

[superset] 01/01: Update chromatic.yml

This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch hughhhh-patch-5
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 7a0d6f58322dc5f5212c1b32aedaf34d520cfc5b
Author: Hugh A. Miles II <hu...@gmail.com>
AuthorDate: Tue Aug 23 16:37:04 2022 -0400

    Update chromatic.yml
---
 .github/workflows/chromatic.yml | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml
index c53e34dc8a..cc462c7a1e 100644
--- a/.github/workflows/chromatic.yml
+++ b/.github/workflows/chromatic.yml
@@ -56,6 +56,7 @@ jobs:
         working-directory: superset-frontend
       # 👇 Checks if the branch is not master and runs Chromatic
       - name: Publish to Chromatic
+        id: chromatic-pr
         if: github.ref != 'refs/heads/master'
         uses: chromaui/action@v1
         # Required options for the Chromatic GitHub Action
@@ -63,10 +64,11 @@ jobs:
           # 👇 Location of package.json from root of mono-repo
           workingDir: superset-frontend
           # 👇 Chromatic projectToken, refer to the Chromatic manage page to obtain it.
-          projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
+          projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}'
           exitZeroOnChanges: true # 👈 Option to prevent the workflow from failing
       # 👇 Checks if the branch is master and accepts all changes in Chromatic
       - name: Publish to Chromatic and auto accept changes
+        id: chromatic-master
         if: github.ref == 'refs/heads/master'
         uses: chromaui/action@v1
         # Required options for the Chromatic GitHub Action
@@ -77,3 +79,16 @@ jobs:
           projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
           autoAcceptChanges: true # 👈 Option to accept all changes when merging to master
           exitZeroOnChanges: true # 👈 Option to prevent the workflow from failing
+      - name: Echo Storybook build link
+        if: ${{ success() }} && github.ref != 'refs/heads/master'
+        uses: actions/github-script@v3
+        with:
+          github-token: ${{secrets.GITHUB_TOKEN}}
+          script: |
+            github.issues.createComment({
+              issue_number: ${{ github.event.issue.number }},
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              body: 'Storybook has completed and can be viewed at ${{ steps.chromatic-pr.outputs.storybookUrl }}'
+            })
+