chore: 메인 브랜치 최신화 #148
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🐰 Frontend CI | |
| on: | |
| pull_request: | |
| branches: [main, dev] | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| build-check: | |
| name: 🧸 Build & Quality Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout | |
| uses: actions/checkout@v4 | |
| - name: ⚡ Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: 📦 Install Yarn v1.22.22 | |
| run: | | |
| curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.22 | |
| echo "$HOME/.yarn/bin" >> $GITHUB_PATH | |
| echo "Yarn version: $(yarn --version)" | |
| - name: 📦 Install Dependencies | |
| run: yarn install | |
| - name: 🔎 Lint | |
| run: yarn lint | |
| - name: 🏗️ Build | |
| run: yarn build | |
| - name: ✅ Post success comment | |
| if: ${{ success() }} | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const body = [ | |
| "🚀 빌드 체크 완료!", | |
| "", | |
| "- Lint ✅", | |
| "- Build ✅" | |
| ].join("\n"); | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body | |
| }); | |
| - name: ❌ Post failure comment | |
| if: ${{ failure() }} | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const body = [ | |
| "🔥 빌드 실패 ㅠㅠ", | |
| "", | |
| "자세한 로그는 **Actions → 해당 워크플로우 → Jobs → Build & Quality Check**에서 확인해주세요." | |
| ].join("\n"); | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body | |
| }); |