Skip to content

Commit

Permalink
chore: build dist (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
google-github-actions-bot authored Dec 6, 2021
1 parent f0d0410 commit d3cf742
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9696,14 +9696,18 @@ function isWIFCredFile(credFile) {
/**
* Authenticates the gcloud tool using a service account key or WIF credential configuration
* discovered via GOOGLE_GHA_CREDS_PATH environment variable. An optional serviceAccountKey
* param is supported for legacy Actions.
* param is supported for legacy Actions and will take precedence over GOOGLE_GHA_CREDS_PATH.
*
* @param serviceAccountKey - The service account key used for authentication.
* @param silent - Skip writing output to sdout.
* @returns exit code.
*/
function authenticateGcloudSDK(serviceAccountKey, silent = true) {
return __awaiter(this, void 0, void 0, function* () {
// Support legacy actions that pass in SA key
if (serviceAccountKey) {
return authGcloudSAKey(serviceAccountKey, silent);
}
// Check if GOOGLE_GHA_CREDS_PATH has been set by auth
if (process.env.GOOGLE_GHA_CREDS_PATH) {
const credFilePath = process.env.GOOGLE_GHA_CREDS_PATH;
Expand All @@ -9714,10 +9718,6 @@ function authenticateGcloudSDK(serviceAccountKey, silent = true) {
}
return authGcloudSAKey(credFile, silent);
}
// Support legacy actions that pass in SA key
if (serviceAccountKey) {
return authGcloudSAKey(serviceAccountKey, silent);
}
// One of GOOGLE_GHA_CREDS_PATH or SA key is required
throw new Error('Error authenticating the Cloud SDK. Please use `google-github-actions/auth` to export credentials.');
});
Expand Down

0 comments on commit d3cf742

Please sign in to comment.