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
+84-1Lines changed: 84 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -174,9 +174,92 @@ only works using a custom runner hosted on GCP.**
174
174
The action will automatically detect and use the Application Default
175
175
Credentials.
176
176
177
+
## Example Workflows
178
+
179
+
* [Deploy a prebuilt container](#deploy-a-prebuilt-container)
180
+
181
+
* [Build and deploy a container](#build-and-deploy-a-container)
182
+
183
+
### Setup
184
+
185
+
1. Create a new Google Cloud Project (or select an existing project).
186
+
187
+
1. [Enable the Cloud Run API](https://console.cloud.google.com/flows/enableapi?apiid=run.googleapis.com).
188
+
189
+
1. [Create a Google Cloud service account][sa] or select an existing one.
190
+
191
+
1. Add the the following [Cloud IAM roles][roles] to your service account:
192
+
193
+
- `Cloud Run Admin`- allows for the creation of new Cloud Run services
194
+
195
+
- `Service Account User`- required to deploy to Cloud Run as service account
196
+
197
+
- `Storage Admin`- allow push to Google Container Registry (this grants project level access, but recommend reducing this scope to [bucket level permissions](https://cloud.google.com/container-registry/docs/access-control#grant).)
198
+
199
+
1. [Download a JSON service account key][create-key] for the service account.
200
+
201
+
1. Add the following [secrets to your repository's secrets][gh-secret]:
202
+
203
+
- `GCP_PROJECT`: Google Cloud project ID
204
+
205
+
- `GCP_SA_KEY`: the downloaded service account key
206
+
207
+
### Deploy a prebuilt container
208
+
209
+
To run this [workflow](.github/workflows/example-workflow-quickstart.yaml), push to the branch named `example-deploy`:
210
+
211
+
```sh
212
+
git push YOUR-FORK main:example-deploy
213
+
```
214
+
215
+
### Build and deploy a container
216
+
217
+
To run this [workflow](.github/workflows/example-workflow.yaml), push to the branch named `example-build-deploy`:
218
+
219
+
```sh
220
+
git push YOUR-FORK main:example-build-deploy
221
+
```
222
+
223
+
**Reminder: If this is your first deployment of a service, it will reject all unauthenticated requests. Learn more at [allowing unauthenticated requests](#Allow-unauthenticated-requests)**
Note: The action is for the "managed" platform and will not set access privileges such as [allowing unauthenticated requests](#Allow-unauthenticated-requests).
0 commit comments