diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2023-05-11 22:20:26 +0900 |
|---|---|---|
| committer | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2023-05-11 22:20:26 +0900 |
| commit | b01a1b3c178d0f2838facb674f75bd46860188b9 (patch) | |
| tree | bffd978fa164128c023967ba3a474d0bb71fd7f4 /.github | |
| parent | ci: skip non-Japanese locale on TurboSnap (diff) | |
| download | sharkey-b01a1b3c178d0f2838facb674f75bd46860188b9.tar.gz sharkey-b01a1b3c178d0f2838facb674f75bd46860188b9.tar.bz2 sharkey-b01a1b3c178d0f2838facb674f75bd46860188b9.zip | |
ci: notify on changes for push events
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/storybook.yml | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index 05efbb12e6..77c117bbc3 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -57,7 +57,9 @@ jobs: if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then echo "skip=true" >> $GITHUB_OUTPUT fi - pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static $(echo "$CHROMATIC_PARAMETER") + if pnpm --filter frontend chromatic -d storybook-static $(echo "$CHROMATIC_PARAMETER"); then + echo "success=true" >> $GITHUB_OUTPUT + fi env: CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - name: Publish to Chromatic @@ -75,6 +77,18 @@ jobs: pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static $(echo "$CHROMATIC_PARAMETER") env: CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + - name: Notify that Chromatic detects changes + uses: actions/github-script@v6.4.0 + if: github.event_name != 'pull_request_target' && steps.chromatic_push.outputs.success == 'false' + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.rest.repos.createCommitComment({ + owner: context.repo.owner, + repo: context.repo.repo, + commit_sha: context.sha, + body: 'Chromatic detects changes. Please [review the changes on Chromatic](https://www.chromatic.com/builds?appId=6428f7d7b962f0b79f97d6e4).' + }) - name: Notify that Chromatic will skip testing uses: actions/github-script@v6.4.0 if: github.event_name == 'pull_request_target' && steps.chromatic_pull_request.outputs.skip == 'true' |