Skip to content

Commit 242fb2d

Browse files
committed
Add pipeline v3
1 parent 3735d41 commit 242fb2d

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

.github/workflows/build-push-image-gcp.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
push:
44
branches:
55
- main
6+
paths:
7+
- producer/**
68
workflow_dispatch:
79

810
env:
@@ -29,7 +31,7 @@ jobs:
2931

3032
- name: Push Docker Image to GCP Artifact Registry
3133
run: |-
32-
gcloud builds submit --tag $GCP_REGION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME/$IMAGE_NAME:${GITHUB_SHA::7}
34+
gcloud builds submit --tag $GCP_REGION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME/$IMAGE_NAME:${GITHUB_SHA::7} --file=./producer/Dockerfile
3335
gcloud container images add-tag $GCP_REGION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME/$IMAGE_NAME:${GITHUB_SHA::7} $GCP_REGION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME/$IMAGE_NAME:latest
3436
3537
- name: Deploy Cloud Run from GCP Artifact Registry

infrastructure/producer_service.tf

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ data "google_iam_policy" "noauth" {
3232
}
3333
}
3434

35-
resource "google_cloud_run_service_iam_policy" "noauth" {
36-
location = google_cloud_run_service.producer.location
37-
project = google_cloud_run_service.producer.project
38-
service = google_cloud_run_service.producer.name
39-
40-
policy_data = data.google_iam_policy.noauth.policy_data
41-
42-
}
35+
resource "google_cloud_run_service_iam_member" "member" {
36+
location = google_cloud_run_service.producer.location
37+
project = google_cloud_run_service.producer.project
38+
service = google_cloud_run_service.producer.name
39+
role = "roles/viewer"
40+
member = "user:[email protected]"
41+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)