Skip to content

Commit

Permalink
feat: CI git-action script
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoiWonYu committed Jul 26, 2023
1 parent ccd21b0 commit a86c98c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@ name: CI/CD

on:
push:
branches: [master]

jobs:
CI:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- run: yarn install
- run: npx @nestjs/cli build
- run: yarn run lint
build:
needs: CI
if: github.ref == 'refs/heads/master'
name: Build Image
runs-on: ubuntu-latest

Expand All @@ -31,6 +42,7 @@ jobs:
docker push ${{secrets.ECR_IMAGE_URI}}:latest
deploy:
needs: build
if: github.ref == 'refs/heads/master'
name: CD
runs-on: self-hosted

Expand Down

0 comments on commit a86c98c

Please sign in to comment.