Skip to content

Commit

Permalink
Update action-check-pr.yaml (#2)
Browse files Browse the repository at this point in the history
pnpm을 전역으로 설치
  • Loading branch information
rieulp committed Nov 7, 2024
1 parent f702182 commit 8f1e8e2
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/action-check-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Check Pull Request

on:
pull_request:
types: [opened, edited, synchronize, reopened, ready_for_review]

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install pnpm
run: npm install -g pnpm # pnpm을 전역으로 설치

- name: Install Dependencies
run: pnpm install # pnpm을 사용하여 의존성 설치

- name: Run Lint
run: pnpm lint # 린트 실행

- name: Run Prettier
run: pnpm format --check # 프리티어 체크

- name: Build
run: pnpm build # 빌드 실행

label:
runs-on: ubuntu-latest
needs: check # check 작업이 완료된 후 실행

steps:
- name: Add Labels
if: github.event.pull_request.draft == false # 드래프트가 아닐 경우에만 실행
uses: actions/add-labels@v1
with:
labels: ${{ github.event.pull_request.base.ref == 'dev' && 'dev' || github.event.pull_request.base.ref == 'main' && 'main'}} # dev로 머지 시 dev 라벨, main으로 머지 시 main 라벨

0 comments on commit 8f1e8e2

Please sign in to comment.