You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+92-12Lines changed: 92 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ name: ci
39
39
40
40
on:
41
41
push:
42
-
branches: master
42
+
branches: main
43
43
44
44
jobs:
45
45
login:
@@ -64,7 +64,7 @@ name: ci
64
64
65
65
on:
66
66
push:
67
-
branches: master
67
+
branches: main
68
68
69
69
jobs:
70
70
login:
@@ -92,7 +92,7 @@ name: ci
92
92
93
93
on:
94
94
push:
95
-
branches: master
95
+
branches: main
96
96
97
97
jobs:
98
98
login:
@@ -118,7 +118,7 @@ name: ci
118
118
119
119
on:
120
120
push:
121
-
branches: master
121
+
branches: main
122
122
123
123
jobs:
124
124
login:
@@ -142,6 +142,45 @@ jobs:
142
142
> Google Container Registry, use the information [on this page](https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr)
143
143
> to learn about transitioning to Google Artifact Registry.
144
144
145
+
You can use either workload identity federation based keyless authentication or service account based authentication.
146
+
147
+
#### Workload identity federation based authentication
148
+
149
+
Configure the workload identity federation for github actions in gcloud (for steps, [refer here](https://github.com/google-github-actions/auth#setting-up-workload-identity-federation)). In the steps, your service account should the ability to push to GCR. Then use google-github-actions/auth action for authentication using workload identity like below:
> Replace `<workload_identity_provider>` with configured workload identity provider. For steps to configure, [refer here](https://github.com/google-github-actions/auth#setting-up-workload-identity-federation).
179
+
180
+
> Replace `<service_account>` with configured service account in workload identity provider which has access to push to GCR
181
+
182
+
#### Service account based authentication
183
+
145
184
Use a service account with the ability to push to GCR and [configure access control](https://cloud.google.com/container-registry/docs/access-control).
146
185
Then create and download the JSON key for this service account and save content of `.json` file
147
186
[as a secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets-for-a-repository)
@@ -153,7 +192,7 @@ name: ci
153
192
154
193
on:
155
194
push:
156
-
branches: master
195
+
branches: main
157
196
158
197
jobs:
159
198
login:
@@ -170,6 +209,47 @@ jobs:
170
209
171
210
### Google Artifact Registry (GAR)
172
211
212
+
You can use either workload identity federation based keyless authentication or service account based authentication.
213
+
214
+
#### Workload identity federation based authentication
215
+
216
+
Configure the workload identity federation for github actions in gcloud (for steps, [refer here](https://github.com/google-github-actions/auth#setting-up-workload-identity-federation)). In the steps, your service account should the ability to push to GAR. Then use google-github-actions/auth action for authentication using workload identity like below:
> Replace `<workload_identity_provider>` with configured workload identity provider
245
+
246
+
> Replace `<service_account>` with configured service account in workload identity provider which has access to push to GCR
247
+
248
+
> Replace `<location>` with the regional or multi-regional [location](https://cloud.google.com/artifact-registry/docs/repo-organize#locations)
249
+
> of the repository where the image is stored.
250
+
251
+
#### Service account based authentication
252
+
173
253
Use a service account with the ability to push to GAR and [configure access control](https://cloud.google.com/artifact-registry/docs/access-control).
174
254
Then create and download the JSON key for this service account and save content of `.json` file
175
255
[as a secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets-for-a-repository)
0 commit comments