This repository was archived by the owner on Jul 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +45
-4
lines changed Expand file tree Collapse file tree 2 files changed +45
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : Deploy dev
2
2
on :
3
3
workflow_dispatch :
4
- push :
5
- branches :
6
- - add-ci
7
4
env :
8
5
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
10
6
GCP_WORKLOAD_IDENTITY_PROVIDER : projects/723082692741/locations/global/workloadIdentityPools/github-oidc-pool/providers/github-provider
11
7
GCP_SERVICE_ACCOUNT : reearth-dev-github-oidc@reearth-development.iam.gserviceaccount.com
12
8
GCP_REGION : asia-northeast1
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments