From 69afd0480e176b105ad1482c7fc72480ecd1b51a Mon Sep 17 00:00:00 2001 From: "Acid Chicken (硫酸鶏)" Date: Wed, 10 May 2023 10:33:49 +0000 Subject: ci: fix typo --- .github/workflows/storybook.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.github') diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index eb6ace27da..05efbb12e6 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -20,7 +20,7 @@ jobs: fetch-depth: 0 submodules: true - name: Checkout HEAD - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request_target' run: git checkout ${{ github.head_ref }} - name: Install pnpm uses: pnpm/action-setup@v2 @@ -41,12 +41,12 @@ jobs: - name: Build storybook run: pnpm --filter frontend build-storybook - name: Publish to Chromatic - if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master' + if: github.event_name != 'pull_request_target' && github.ref == 'refs/heads/master' run: pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static env: CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - name: Publish to Chromatic - if: github.event_name != 'pull_request' && github.ref != 'refs/heads/master' + if: github.event_name != 'pull_request_target' && github.ref != 'refs/heads/master' id: chromatic_push run: | DIFF="${{ github.event.before }} HEAD" @@ -61,7 +61,7 @@ jobs: env: CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - name: Publish to Chromatic - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request_target' id: chromatic_pull_request run: | DIFF="${{ github.base_ref }} HEAD" @@ -77,7 +77,7 @@ jobs: CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - name: Notify that Chromatic will skip testing uses: actions/github-script@v6.4.0 - if: github.event_name == 'pull_request' && steps.chromatic_pull_request.outputs.skip == 'true' + if: github.event_name == 'pull_request_target' && steps.chromatic_pull_request.outputs.skip == 'true' with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | -- cgit v1.2.3-freya From 3c0dccc8b9f25c6a6954436db5ca63f9bb4d5b59 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Thu, 11 May 2023 19:28:17 +0900 Subject: meta: Remove @rinsuki from reviewer-lottery (#10830) --- .github/reviewer-lottery.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.github') diff --git a/.github/reviewer-lottery.yml b/.github/reviewer-lottery.yml index fd2fb1913f..c88e1342de 100644 --- a/.github/reviewer-lottery.yml +++ b/.github/reviewer-lottery.yml @@ -6,5 +6,4 @@ groups: - syuilo - acid-chicken - EbiseLutica - - rinsuki - tamaina -- cgit v1.2.3-freya From b01a1b3c178d0f2838facb674f75bd46860188b9 Mon Sep 17 00:00:00 2001 From: "Acid Chicken (硫酸鶏)" Date: Thu, 11 May 2023 22:20:26 +0900 Subject: ci: notify on changes for push events --- .github/workflows/storybook.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to '.github') 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' -- cgit v1.2.3-freya From 909ec8c38d0f03bd59bdf8d278908e3e43a34b45 Mon Sep 17 00:00:00 2001 From: "Acid Chicken (硫酸鶏)" Date: Thu, 11 May 2023 22:21:48 +0900 Subject: ci: fix missing branch --- .github/workflows/storybook.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github') diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index 77c117bbc3..b04f4260c3 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -59,6 +59,8 @@ jobs: fi if pnpm --filter frontend chromatic -d storybook-static $(echo "$CHROMATIC_PARAMETER"); then echo "success=true" >> $GITHUB_OUTPUT + else + echo "success=false" >> $GITHUB_OUTPUT fi env: CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} -- cgit v1.2.3-freya