Skip to content
This repository was archived by the owner on Jul 4, 2024. It is now read-only.

Commit 97ec397

Browse files
committed
test
1 parent f169fa4 commit 97ec397

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

.github/workflows/deploy_dev.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
name: Deploy dev
22
on:
33
workflow_dispatch:
4-
push:
5-
branches:
6-
- add-ci
74
env:
85
IMAGE_NAME_GAR: asia-northeast1-docker.pkg.dev/reearth-development/eukarya/notion-proxy
9-
IMAGE_NAME_PLATEAU: asia-northeast1-docker.pkg.dev/reearth-plateau-dev/reearth/reearth-cloud
106
GCP_WORKLOAD_IDENTITY_PROVIDER: projects/723082692741/locations/global/workloadIdentityPools/github-oidc-pool/providers/github-provider
117
GCP_SERVICE_ACCOUNT: reearth-dev-github-oidc@reearth-development.iam.gserviceaccount.com
128
GCP_REGION: asia-northeast1

.github/workflows/deploy_prod.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy prod
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- add-ci
7+
env:
8+
IMAGE_NAME_GAR: asia-northeast1-docker.pkg.dev/reearth/eukarya/notion-proxy
9+
GCP_WORKLOAD_IDENTITY_PROVIDER: projects/950334725361/locations/global/workloadIdentityPools/github-oidc-pool/providers/github-provider
10+
GCP_SERVICE_ACCOUNT: [email protected]
11+
GCP_REGION: asia-northeast1
12+
GAR_REPOSITORY: asia-northeast1-docker.pkg.dev
13+
jobs:
14+
build:
15+
uses: ./.github/workflows/_build.yaml
16+
with:
17+
workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }}
18+
service_account: ${{ env.GCP_SERVICE_ACCOUNT }}
19+
gar_repository: ${{ env.GAR_REPOSITORY }}
20+
gar_dst: ${{ env.IMAGE_NAME_GAR }}
21+
deploy:
22+
runs-on: ubuntu-latest
23+
needs: build
24+
if: ${{ !failure() && github.ref_name == 'add-ci' }}
25+
permissions:
26+
contents: read
27+
id-token: write
28+
packages: read
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: google-github-actions/auth@v2
32+
with:
33+
workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }}
34+
service_account: ${{ env.GCP_SERVICE_ACCOUNT }}
35+
- name: Set up Cloud SDK
36+
uses: google-github-actions/setup-gcloud@v2
37+
- name: Deploy to Cloud Run
38+
run: |
39+
gcloud run deploy reearth-help \
40+
--image $IMAGE_NAME \
41+
--region $GCP_REGION \
42+
--platform managed \
43+
--quiet
44+
env:
45+
IMAGE_NAME: ${{ env.IMAGE_NAME_GAR }}:latest

0 commit comments

Comments
 (0)