Skip to content

Commit

Permalink
Merge pull request #19 from a-company-jp/fix-ci-cloudrun-svc-path
Browse files Browse the repository at this point in the history
CloudRun YAML情報保存場所変更
  • Loading branch information
Shion1305 authored Apr 13, 2024
2 parents 1312adb + 1e155d4 commit 9a0f25f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-cloudrun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ jobs:

- name: Download Cloud Run Service YAML
run: |
gcloud run services describe dev-main-backend --format yaml --region asia-northeast1 > ./cloudrun/service.yaml
gcloud run services describe dev-main-backend --format yaml --region asia-northeast1 > ./service.yaml
# replace github_sha field to latest commit sha. Changing spec.template is required to deploy new revision.
# reference: https://cloud.google.com/run/docs/deploying?hl=ja#revision -- check yaml tab.
- name: Change some property of service-frontend-release.yaml
run: |
sed -i "s/github_sha: .*/github_sha: ${{ github.sha }}/g" ./cloudrun/service.yaml
sed -i "s/github_sha: .*/github_sha: ${{ github.sha }}/g" ./service.yaml
- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v2
with:
region: "asia-northeast1"
metadata: "./cloudrun/service.yaml"
metadata: "./service.yaml"
env_vars_file: ".env"

0 comments on commit 9a0f25f

Please sign in to comment.