Skip to content

Commit b95142b

Browse files
author
Bryan Sieber
committed
Deploying to cloud run
1 parent 5c9f946 commit b95142b

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/build-image.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
username: _json_key
5454
password: ${{ secrets.GCP_CREDENTIALS }}
5555

56-
- name: Build and push to GCR v2
56+
- name: Build and push to GCR
5757
id: build-push
5858
env:
5959
GCR_REGISTRY: gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_APP_NAME }}
@@ -70,3 +70,18 @@ jobs:
7070
docker image tag $GCR_REGISTRY/$GCR_REPOSITORY:$IMAGE_TAG $GCR_REGISTRY/$GCR_REPOSITORY:latest
7171
docker push $GCR_REGISTRY/$GCR_REPOSITORY:$IMAGE_TAG
7272
docker push $GCR_REGISTRY/$GCR_REPOSITORY:latest
73+
74+
- name: Login to gcloud
75+
uses: google-github-actions/setup-gcloud@v0
76+
with:
77+
project_id: ${{ secrets.GCP_PROJECT_ID }}
78+
service_account_email: ${{ secrets.GCP_EMAIL }}
79+
service_account_key: ${{ secrets.GCP_CREDENTIALS }}
80+
81+
- name: Deploy to Cloud Run
82+
run: |
83+
gcloud run deploy ${{ secrets.GCP_APP_NAME }} \
84+
--image gcr.io/${{ secrets.GCP_PROJECT }}/${{ secrets.GCP_APP_NAME }}:$IMAGE_TAG \
85+
--platform managed \
86+
--allow-unauthenticated \
87+
--update-secrets=JIRA_PASSWORD=JIRA_PASSWORD:latest,JIRA_USERNAME=JIRA_USERNAME:latest,BUGZILLA_API_KEY=BUGZILLA_API_KEY:latest # pragma: allowlist secret

0 commit comments

Comments
 (0)