Skip to content

Commit

Permalink
🌐 [Ci] action script 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
seungheon123 committed Nov 9, 2024
1 parent 3718e2a commit 12aeb82
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/api-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: API Server Ci/Cd
on:
push:
branches:
- Ci/69
- develop
paths:
# - 'apps/api/**'
jobs:
build-and-push:
runs-on: ubuntu-latest

env:
IMAGE_NAME: api-camon

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

- name: Log in to Ncloud Container Registry
env:
USERNAME: ${{ secrets.NCLOUD_ACCESS_KEY }}
PASSWORD: ${{ secrets.NCLOUD_SECRET_KEY }}
REGISTRY_URL: ${{ secrets.NCLOUD_REGISTRY_URL }}
run: |
echo "$PASSWORD" | docker login -u "$USERNAME" "$REGISTRY_URL" --password-stdin
- name: Build Docker image
run: |
docker build -t ${{ secrets.NCLOUD_REGISTRY_URL }}/$IMAGE_NAME:latest ./apps/api
- name: Push to Ncloud Container Registry
run: |
docker push ${{ secrets.NCLOUD_REGISTRY_URL }}/$IMAGE_NAME:latest


0 comments on commit 12aeb82

Please sign in to comment.