Skip to content

Commit

Permalink
Merge pull request #11 from goormthon-Univ/feat/add-dev-cicd
Browse files Browse the repository at this point in the history
[feat] dev deploy
  • Loading branch information
uommou authored Mar 22, 2024
2 parents 14e1846 + ea0b933 commit df7c24e
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Node.js CI/CD

on:
push:
branches: [ main, feat/cicd ]
branches: [ main, dev, feat/cicd ]
pull_request:
branches: [ main ]

Expand Down Expand Up @@ -52,14 +52,30 @@ jobs:
uses: docker/build-push-action@v2
with:
push: true
tags: asia-northeast3-docker.pkg.dev/ancient-ivy-416408/groom/decalcomanie:latest
tags: asia-northeast3-docker.pkg.dev/ancient-ivy-416408/groom/${{ github.ref == 'refs/heads/main' && 'decalcomanie' || 'decalcomanie-dev' }}:latest
file: Dockerfile
context: .

- name: Deploy to Cloud Run
uses: google-github-actions/[email protected]
with:
service: decalcomanie
image: asia-northeast3-docker.pkg.dev/ancient-ivy-416408/groom/decalcomanie:latest
service: ${{ github.ref == 'refs/heads/main' && 'decalcomanie' || 'decalcomanie-dev' }}
image: asia-northeast3-docker.pkg.dev/ancient-ivy-416408/groom/${{ github.ref == 'refs/heads/main' && 'decalcomanie' || 'decalcomanie-dev' }}:latest
region: asia-northeast3
credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}

# - name: Build and push Docker image
# uses: docker/build-push-action@v2
# with:
# push: true
# tags: asia-northeast3-docker.pkg.dev/ancient-ivy-416408/groom/decalcomanie:latest
# file: Dockerfile
# context: .

# - name: Deploy to Cloud Run
# uses: google-github-actions/[email protected]
# with:
# service: decalcomanie
# image: asia-northeast3-docker.pkg.dev/ancient-ivy-416408/groom/decalcomanie:latest
# region: asia-northeast3
# credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}

0 comments on commit df7c24e

Please sign in to comment.