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

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomoyane committed Apr 14, 2024
1 parent f169fa4 commit 97ec397
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/deploy_dev.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: Deploy dev
on:
workflow_dispatch:
push:
branches:
- add-ci
env:
IMAGE_NAME_GAR: asia-northeast1-docker.pkg.dev/reearth-development/eukarya/notion-proxy
IMAGE_NAME_PLATEAU: asia-northeast1-docker.pkg.dev/reearth-plateau-dev/reearth/reearth-cloud
GCP_WORKLOAD_IDENTITY_PROVIDER: projects/723082692741/locations/global/workloadIdentityPools/github-oidc-pool/providers/github-provider
GCP_SERVICE_ACCOUNT: reearth-dev-github-oidc@reearth-development.iam.gserviceaccount.com
GCP_REGION: asia-northeast1
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy prod
on:
workflow_dispatch:
push:
branches:
- add-ci
env:
IMAGE_NAME_GAR: asia-northeast1-docker.pkg.dev/reearth/eukarya/notion-proxy
GCP_WORKLOAD_IDENTITY_PROVIDER: projects/950334725361/locations/global/workloadIdentityPools/github-oidc-pool/providers/github-provider
GCP_SERVICE_ACCOUNT: [email protected]
GCP_REGION: asia-northeast1
GAR_REPOSITORY: asia-northeast1-docker.pkg.dev
jobs:
build:
uses: ./.github/workflows/_build.yaml
with:
workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ env.GCP_SERVICE_ACCOUNT }}
gar_repository: ${{ env.GAR_REPOSITORY }}
gar_dst: ${{ env.IMAGE_NAME_GAR }}
deploy:
runs-on: ubuntu-latest
needs: build
if: ${{ !failure() && github.ref_name == 'add-ci' }}
permissions:
contents: read
id-token: write
packages: read
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ env.GCP_SERVICE_ACCOUNT }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Deploy to Cloud Run
run: |
gcloud run deploy reearth-help \
--image $IMAGE_NAME \
--region $GCP_REGION \
--platform managed \
--quiet
env:
IMAGE_NAME: ${{ env.IMAGE_NAME_GAR }}:latest

0 comments on commit 97ec397

Please sign in to comment.