Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,15 @@ inputs:

region:
description: |-
Region in which the Cloud Run services are deployed.
Region in which the Cloud Run services are deployed. Providing a list enables
multi-region deployment. See the [documentation for deploying a multi-region
service](https://docs.cloud.google.com/run/docs/multiple-regions#deploy)

Please note, this GitHub Action cannot parse regions provided in the metadata
YAML file and will always fallback to the region provided here, defaulting always
to `us-central1` if none is given. This is a known issue but this behavior being
kept to avoid breaking existing actions.

default: 'us-central1'
required: false

Expand Down
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,14 @@ export async function run(): Promise<void> {
.flat()
.filter((e) => e !== undefined && e !== null && e !== '')
.join(',');
deployCmd.push('--region', regions);
updateTrafficCmd.push('--region', regions);
}
if (projectId) {
deployCmd.push('--project', projectId);
updateTrafficCmd.push('--project', projectId);

if (region?.length > 1) {
deployCmd.push('--regions', regions);
updateTrafficCmd.push('--regions', regions);
} else {
deployCmd.push('--region', regions);
updateTrafficCmd.push('--region', regions);
}
}

// Add optional deploy flags
Expand Down