Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose created revision name as an output #556

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/output-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down