fix: 결제 API 파라미터 수정 #1
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: Deploy to Google Cloud Run | |
env: | |
SERVICE_NAME: digital-bridge-backend | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
jobs: | |
dockerize-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Google Cloud Auth | |
uses: google-github-actions/auth@v2 | |
with: | |
project_id: ${{ secrets.GCP_PROJECT_ID }} | |
credentials_json: ${{ secrets.GCP_CREDENTIALS }} | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v2 | |
- name: Configure Docker | |
run: | | |
gcloud auth configure-docker ${{ secrets.GCP_REGION }}-docker.pkg.dev | |
- name: Get secret from Secret Manager | |
run: | | |
gcloud secrets versions access latest --secret=${{ secrets.DOCUMENT_AI_CREDENTIAL_SECRET }} > service-account-file.json | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ secrets.GCP_REGION }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_REGISTRY_NAME }}/${{ secrets.DOCKER_IMAGE_NAME }}:${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Deploy to Cloud Run | |
run: | | |
gcloud run deploy ${{ env.SERVICE_NAME }} \ | |
--image=${{ secrets.GCP_REGION }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_REGISTRY_NAME }}/${{ secrets.DOCKER_IMAGE_NAME }}:${{ github.sha }} \ | |
--region=${{ secrets.GCP_REGION }} \ | |
--platform=managed \ | |
--allow-unauthenticated \ | |
--set-env-vars KORAIL_ID=${{ secrets.KORAIL_ID }} \ | |
--set-env-vars KORAIL_PW=${{ secrets.KORAIL_PW }} \ | |
--set-env-vars CARD_PASSWORD=${{ secrets.CARD_PASSWORD }} \ | |
--set-env-vars AUTH_NUMBER=${{ secrets.AUTH_NUMBER }} \ | |
--set-env-vars GOOGLE_CLOUD_PROJECT_ID=${{ secrets.GOOGLE_CLOUD_PROJECT_ID }} \ | |
--set-env-vars GOOGLE_CLOUD_LOCATION=${{ secrets.GOOGLE_CLOUD_LOCATION }} \ | |
--set-env-vars GOOGLE_CLOUD_PROCESSOR_ID=${{ secrets.GOOGLE_CLOUD_PROCESSOR_ID }} \ | |
# --set-env-vars GOOGLE_APPLICATION_CREDENTIALS=/app/service-account-file.json | |
# | |
# - name: Clean up | |
# run: rm service-account-file.json |