@@ -50,7 +50,6 @@ import {
50
50
parseKVString ,
51
51
pinnedToHeadWarning ,
52
52
presence ,
53
- stubEnv ,
54
53
} from '@google-github-actions/actions-utils' ;
55
54
56
55
import { parseDeployResponse , parseDescribeResponse } from './output-parser' ;
@@ -74,10 +73,10 @@ let originalAppYamlContents: string, originalAppYamlPath: string;
74
73
*/
75
74
export async function run ( ) : Promise < void > {
76
75
// Register metrics
77
- const restoreEnv = stubEnv ( {
78
- CLOUDSDK_METRICS_ENVIRONMENT : 'github-actions-deploy-appengine' ,
79
- CLOUDSDK_METRICS_ENVIRONMENT_VERSION : appVersion ,
80
- } ) ;
76
+ process . env . CLOUDSDK_CORE_DISABLE_PROMPTS = '1' ;
77
+ process . env . CLOUDSDK_METRICS_ENVIRONMENT = 'github-actions-deploy-cloudrun' ;
78
+ process . env . CLOUDSDK_METRICS_ENVIRONMENT_VERSION = appVersion ;
79
+ process . env . GOOGLE_APIS_USER_AGENT = `google-github-actions:deploy-appengine/ ${ appVersion } ` ;
81
80
82
81
// Warn if pinned to HEAD
83
82
if ( isPinnedToHead ( ) ) {
@@ -155,7 +154,7 @@ export async function run(): Promise<void> {
155
154
const toolCommand = getToolCommand ( ) ;
156
155
157
156
// Create app engine gcloud cmd.
158
- let appDeployCmd = [ 'app' , 'deploy' , '--quiet' , '-- format', 'json' , ...deliverables ] ;
157
+ let appDeployCmd = [ 'app' , 'deploy' , '--format' , 'json' , ...deliverables ] ;
159
158
160
159
// Add gcloud flags.
161
160
if ( projectId ) {
@@ -219,7 +218,7 @@ export async function run(): Promise<void> {
219
218
logDebug ( `Deployed new version: ${ JSON . stringify ( deployResponse ) } ` ) ;
220
219
221
220
// Look up the new version to get metadata.
222
- const appVersionsDescribeCmd = [ 'app' , 'versions' , 'describe' , '--quiet' , '-- format', 'json' ] ;
221
+ const appVersionsDescribeCmd = [ 'app' , 'versions' , 'describe' , '--format' , 'json' ] ;
223
222
appVersionsDescribeCmd . push ( '--project' , deployResponse . project ) ;
224
223
appVersionsDescribeCmd . push ( '--service' , deployResponse . service ) ;
225
224
appVersionsDescribeCmd . push ( deployResponse . versionID ) ;
@@ -259,8 +258,6 @@ export async function run(): Promise<void> {
259
258
const msg = errorMessage ( err ) ;
260
259
setFailed ( `google-github-actions/deploy-appengine failed with: ${ msg } ` ) ;
261
260
} finally {
262
- restoreEnv ( ) ;
263
-
264
261
if ( originalAppYamlPath && originalAppYamlContents ) {
265
262
logDebug ( `Restoring original ${ originalAppYamlPath } contents` ) ;
266
263
await fs . writeFile ( originalAppYamlPath , originalAppYamlContents , { flag : 'w' } ) ;
0 commit comments