File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1616
1717import * as httpm from 'typed-rest-client/HttpClient' ;
1818import { retry } from '@lifeomic/attempt' ;
19- import { GCLOUD_METRICS_LABEL } from './install-util' ;
2019
2120/**
2221 * Formats the gcloud SDK release URL according to the specified arguments.
@@ -68,7 +67,7 @@ export async function getReleaseURL(
6867) : Promise < string > {
6968 try {
7069 const url = formatReleaseURL ( os , arch , version ) ;
71- const client = new httpm . HttpClient ( GCLOUD_METRICS_LABEL ) ;
70+ const client = new httpm . HttpClient ( 'github-actions-setup-gcloud-sdk' ) ;
7271 return retry (
7372 async ( ) => {
7473 const res = await client . head ( url ) ;
Original file line number Diff line number Diff line change @@ -21,9 +21,6 @@ import * as toolCache from '@actions/tool-cache';
2121import * as core from '@actions/core' ;
2222import path from 'path' ;
2323
24- export const GCLOUD_METRICS_ENV_VAR = 'CLOUDSDK_METRICS_ENVIRONMENT' ;
25- export const GCLOUD_METRICS_LABEL = 'github-actions-setup-gcloud' ;
26-
2724/**
2825 * Installs the gcloud SDK into the actions environment.
2926 *
@@ -39,6 +36,5 @@ export async function installGcloudSDK(
3936 let toolPath = await toolCache . cacheDir ( toolRoot , 'gcloud' , version ) ;
4037 toolPath = path . join ( toolPath , 'bin' ) ;
4138 core . addPath ( toolPath ) ;
42- core . exportVariable ( GCLOUD_METRICS_ENV_VAR , GCLOUD_METRICS_LABEL ) ;
4339 return toolPath ;
4440}
Original file line number Diff line number Diff line change 2020
2121import * as httpm from 'typed-rest-client/HttpClient' ;
2222import { retry } from '@lifeomic/attempt' ;
23- import { GCLOUD_METRICS_LABEL } from './install-util' ;
2423
2524/**
2625 * @returns The latest stable version of the gcloud SDK.
2726 */
2827export async function getLatestGcloudSDKVersion ( ) : Promise < string > {
2928 const queryUrl =
3029 'https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json' ;
31- const client : httpm . HttpClient = new httpm . HttpClient ( GCLOUD_METRICS_LABEL ) ;
30+ const client : httpm . HttpClient = new httpm . HttpClient (
31+ 'github-actions-setup-gcloud-sdk' ,
32+ ) ;
3233 return await retry (
3334 async ( ) => {
3435 const res = await client . get ( queryUrl ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,11 @@ import * as core from '@actions/core';
1818import * as exec from '@actions/exec' ;
1919import * as setupGcloud from '../setupGcloudSDK/src/' ;
2020
21+ export const GCLOUD_METRICS_ENV_VAR = 'CLOUDSDK_METRICS_ENVIRONMENT' ;
22+ export const GCLOUD_METRICS_LABEL = 'github-actions-deploy-appengine' ;
23+
2124async function run ( ) : Promise < void > {
25+ core . exportVariable ( GCLOUD_METRICS_ENV_VAR , GCLOUD_METRICS_LABEL ) ;
2226 try {
2327 // Get action inputs.
2428 let projectId = core . getInput ( 'project_id' ) ;
You can’t perform that action at this time.
0 commit comments