fix: export Google GHA creds env var (#57)
* fix: export Google GHA creds env var * add comments for cred envvars * build
This commit is contained in:
parent
2428105372
commit
9a051ab76c
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -240,8 +240,14 @@ function run() {
|
||||
}
|
||||
const credentialsPath = yield client.createCredentialsFile(runnerTempDir);
|
||||
(0, core_1.setOutput)('credentials_file_path', credentialsPath);
|
||||
// CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE is picked up by gcloud to use
|
||||
// a specific credential file (subject to change and equivalent to auth/credential_file_override)
|
||||
(0, core_1.exportVariable)('CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE', credentialsPath);
|
||||
// GOOGLE_APPLICATION_CREDENTIALS is used by Application Default Credentials
|
||||
// in all GCP client libraries
|
||||
(0, core_1.exportVariable)('GOOGLE_APPLICATION_CREDENTIALS', credentialsPath);
|
||||
// GOOGLE_GHA_CREDS_PATH is used by other Google GitHub Actions
|
||||
(0, core_1.exportVariable)('GOOGLE_GHA_CREDS_PATH', credentialsPath);
|
||||
}
|
||||
// Set the project ID environment variables to the computed values.
|
||||
const computedProjectID = yield client.getProjectID();
|
||||
|
@ -88,8 +88,14 @@ async function run(): Promise<void> {
|
||||
|
||||
const credentialsPath = await client.createCredentialsFile(runnerTempDir);
|
||||
setOutput('credentials_file_path', credentialsPath);
|
||||
// CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE is picked up by gcloud to use
|
||||
// a specific credential file (subject to change and equivalent to auth/credential_file_override)
|
||||
exportVariable('CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE', credentialsPath);
|
||||
// GOOGLE_APPLICATION_CREDENTIALS is used by Application Default Credentials
|
||||
// in all GCP client libraries
|
||||
exportVariable('GOOGLE_APPLICATION_CREDENTIALS', credentialsPath);
|
||||
// GOOGLE_GHA_CREDS_PATH is used by other Google GitHub Actions
|
||||
exportVariable('GOOGLE_GHA_CREDS_PATH', credentialsPath);
|
||||
}
|
||||
|
||||
// Set the project ID environment variables to the computed values.
|
||||
|
Loading…
Reference in New Issue
Block a user