[Fix] 카드 옵션 선택 시 POST 409 요청 오류 #132
This file contains 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: Build and Comment | |
on: | |
pull_request: | |
branches: | |
- dev | |
paths: | |
- "client/**" | |
jobs: | |
build-client: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./client | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
- name: Install dependencies | |
run: yarn | |
working-directory: ${{ env.working-directory }} | |
- name: Build project | |
run: yarn build | |
working-directory: ${{ env.working-directory }} | |
comment-client: | |
needs: build-client | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
# 성공 시 코멘트 | |
- name: Add a comment on success | |
if: ${{ needs.build-client.result == 'success' }} | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: '빌드를 성공했습니다! :tada:' | |
}) | |
# 실패 시 코멘트 | |
- name: Add a comment on failure | |
if: ${{ needs.build-client.result == 'failure' }} | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: '빌드를 실패했습니다. :x: 자세한 내용은 로그를 참고해주세요.' | |
}) |