From 975a65109c101d28947514eb680a2be9d682ac47 Mon Sep 17 00:00:00 2001 From: Prerit Das Date: Mon, 13 Jan 2025 22:36:22 -0500 Subject: [PATCH 1/3] Extract revision name. --- src/output-parser.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/output-parser.ts b/src/output-parser.ts index 4a5d3695..f8764127 100644 --- a/src/output-parser.ts +++ b/src/output-parser.ts @@ -104,6 +104,7 @@ export function parseDeployResponse( // Set outputs const outputs: DeployCloudRunOutputs = { url: outputJSON?.status?.url, + revision: outputJSON?.status?.latestCreatedRevisionName, }; // Maintain current logic to use tag url if provided From 458d27b93cefa242f464335e14006e0644c72759 Mon Sep 17 00:00:00 2001 From: Prerit Das Date: Mon, 13 Jan 2025 22:36:33 -0500 Subject: [PATCH 2/3] Mark revision in outputs. --- src/main.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.ts b/src/main.ts index a18900c9..c24d43d1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -67,6 +67,7 @@ const isDebug = */ export interface DeployCloudRunOutputs { url?: string | null | undefined; // Type required to match run_v1.Schema$Service.status.url + revision?: string | null | undefined; // Latest created revision name from the deployment } /** From 7d4958a3d766cc67fd0f5e9ddefe638762122797 Mon Sep 17 00:00:00 2001 From: Prerit Das Date: Mon, 13 Jan 2025 22:36:43 -0500 Subject: [PATCH 3/3] Document the revision output. --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index 42414dbc..cc1160ec 100644 --- a/action.yml +++ b/action.yml @@ -308,6 +308,9 @@ outputs: url: description: |- The URL of the Cloud Run service. + revision: + description: |- + The name of the latest created revision from the deployment. branding: icon: 'chevrons-right'