Skip to content

Commit

Permalink
Fix (github-workflow): Fix failing workflows
Browse files Browse the repository at this point in the history
...by pulling misskey-dev/misskey's workflow src
reviewer lottery is failing since its source is blown up so removing
  • Loading branch information
HotoRas authored Aug 4, 2024
1 parent d690206 commit a73173a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 29 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/reviewer_lottery.yml

This file was deleted.

31 changes: 15 additions & 16 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: Storybook

on:
push:
branches: # []
branches:
- master
- develop
pull_request_target: []
- host
pull_request_target:

jobs:
build:
Expand All @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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 }}
Expand All @@ -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

0 comments on commit a73173a

Please sign in to comment.