ci(#10336): notify on changes

This commit is contained in:
Acid Chicken (硫酸鶏) 2023-04-02 21:50:02 +09:00
parent 5ab02cbeea
commit 5143f3372c
No known key found for this signature in database
GPG key ID: 3E87B98A3F6BAB99

View file

@ -37,9 +37,23 @@ jobs:
env:
NODE_OPTIONS: "--max_old_space_size=7168"
- name: Publish to Chromatic
run: "pnpm --filter frontend chromatic -d storybook-static || :"
id: chromatic
uses: chromaui/action@v1
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitZeroOnChanges: false
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
- name: Notify on changes
uses: actions/github-script@v6.4.0
if: failure()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Chromatic has detected ${{ steps.chromatic.outputs.changeCount }} changes in the Storybook. [Check it out](${{ steps.chromatic.outputs.url }}).'
})
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with: