-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 1.55 KB
/
deploy-frontend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Deploy frontend
on:
workflow_dispatch:
inputs:
cd:
description: cd
required: false
default: deploy-backend.yml
env:
PROJECT_ID: dataplatformcolgate
GAR_LOCATION: us-east4
SERVICE: colgate-repo
REGION: Northern Virginia
REPOSITORY: colgate-repo
jobs:
buid-push-gcr:
permissions:
contents: read
id-token: write
actions: write
runs-on: ubuntu-latest
env:
IMAGE_NAME: frontend-image
GIT_TAG: v0.1.0
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Authenticate google cloud service
id: auth
uses: google-github-actions/auth@v1
with:
workload_identity_provider: projects/671371757704/locations/global/workloadIdentityPools/githubactions/providers/github
service_account: github-actions@dataplatformcolgate.iam.gserviceaccount.com
- name: Authenticate docker to cloud registry
run: |-
gcloud auth configure-docker --quiet
gcloud auth configure-docker us-east4-docker.pkg.dev --quiet
- name: Deploy container to cloud run
id: deploy
uses: google-github-actions/deploy-cloudrun@v1
with:
flags: --service-account=github-actions@dataplatformcolgate.iam.gserviceaccount.com --port=3000
service: frontend-image
gcloud_component: beta
platform: managed
image: ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }}:latest