Skip to content

Commit

Permalink
Merge pull request #165 from santa-close/task/deploy
Browse files Browse the repository at this point in the history
ci: docker build 설정
  • Loading branch information
jbl428 authored Jul 14, 2023
2 parents f011efa + 233051b commit 0d7c7dd
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy to Cloud Run

on:
push:
branches:
- main

jobs:
deploy:
permissions:
contents: 'read'
id-token: 'write'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/santa-close-server:latest

- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: 'projects/394392330167/locations/global/workloadIdentityPools/github-action/providers/github-action'
service_account: '[email protected]'

- name: Deploy to Cloud Run
uses: google-github-actions/deploy-cloudrun@v1
with:
service: santa-close-server
image: fermat428/santa-close-server
1 change: 0 additions & 1 deletion server-app/src/main/resources/application-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ spring:
database-platform: org.hibernate.dialect.MySQLDialect
hibernate:
ddl-auto: validate
use-new-id-generator-mappings: true
naming:
physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy

Expand Down
1 change: 0 additions & 1 deletion server-app/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ spring:
database-platform: org.hibernate.dialect.MySQLDialect
hibernate:
ddl-auto: update
use-new-id-generator-mappings: true
naming:
physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy

Expand Down

0 comments on commit 0d7c7dd

Please sign in to comment.