From a73173a7b0ba655dd52574ec010e4f22d07fcb93 Mon Sep 17 00:00:00 2001 From: Hoto Ras Date: Sun, 4 Aug 2024 09:24:59 +0900 Subject: [PATCH] Fix (github-workflow): Fix failing workflows ...by pulling misskey-dev/misskey's workflow src reviewer lottery is failing since its source is blown up so removing --- .github/workflows/reviewer_lottery.yml | 13 ----------- .github/workflows/storybook.yml | 31 +++++++++++++------------- 2 files changed, 15 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/reviewer_lottery.yml diff --git a/.github/workflows/reviewer_lottery.yml b/.github/workflows/reviewer_lottery.yml deleted file mode 100644 index 33228d7465a6..000000000000 --- a/.github/workflows/reviewer_lottery.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: "Reviewer lottery" -on: - pull_request_target: - types: [opened, ready_for_review, reopened] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: uesteibar/reviewer-lottery@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index 8c372bceb214..9a64a2d5db06 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -2,10 +2,11 @@ name: Storybook on: push: - branches: # [] + branches: - master - develop - pull_request_target: [] + - host + pull_request_target: jobs: build: @@ -15,12 +16,12 @@ jobs: NODE_OPTIONS: "--max_old_space_size=7168" steps: - - uses: actions/checkout@v3.3.0 + - uses: actions/checkout@v4.1.1 if: github.event_name != 'pull_request_target' with: fetch-depth: 0 submodules: true - - uses: actions/checkout@v3.3.0 + - uses: actions/checkout@v4.1.1 if: github.event_name == 'pull_request_target' with: fetch-depth: 0 @@ -33,12 +34,9 @@ jobs: echo "base=$(git rev-list --parents -n1 HEAD | cut -d" " -f2)" >> $GITHUB_OUTPUT git checkout $(git rev-list --parents -n1 HEAD | cut -d" " -f3) - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - run_install: false + uses: pnpm/action-setup@v4 - name: Use Node.js 20.x - uses: actions/setup-node@v3.6.0 + uses: actions/setup-node@v4.0.3 with: node-version-file: '.node-version' cache: 'pnpm' @@ -86,15 +84,16 @@ jobs: if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then echo "skip=true" >> $GITHUB_OUTPUT fi - BRANCH="${{ github.event.pull_request.head.user.login }}:${{ github.event.pull_request.head.ref }}" - if [ "$BRANCH" = "misskey-dev:${{ github.event.pull_request.head.ref }}" ]; then - BRANCH="${{ github.event.pull_request.head.ref }}" + BRANCH="${{ github.event.pull_request.head.user.login }}:$HEAD_REF" + if [ "$BRANCH" = "misskey-dev:$HEAD_REF" ]; then + BRANCH="$HEAD_REF" fi - pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static --branch-name $BRANCH $(echo "$CHROMATIC_PARAMETER") + pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static --branch-name "$BRANCH" $(echo "$CHROMATIC_PARAMETER") env: + HEAD_REF: ${{ github.event.pull_request.head.ref }} CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - name: Notify that Chromatic detects changes - uses: actions/github-script@v6.4.0 + uses: actions/github-script@v7.0.1 if: github.event_name != 'pull_request_target' && steps.chromatic_push.outputs.success == 'false' with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -106,7 +105,7 @@ jobs: body: 'Chromatic detects changes. Please [review the changes on Chromatic](https://www.chromatic.com/builds?appId=6428f7d7b962f0b79f97d6e4).' }) - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: storybook - path: packages/frontend/storybook-static + path: packages/frontend/storybook-static \ No newline at end of file