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

fix: avoid confusion if setup-auth is already ran before #12

Merged
merged 11 commits into from
Apr 17, 2024

Conversation

genisd
Copy link
Member

@genisd genisd commented Apr 17, 2024

No description provided.

@genisd genisd changed the title fix: override GOOGLE_APPLICATIONS_CREDENTIALS locally so if auth is ran in the outer scope this plugin doesn't fail fix: avoid confusion if setup-auth is already ran before Apr 17, 2024
@genisd genisd force-pushed the fix/set-location-of-credentials-explicitly branch from 341f860 to 4fcd35f Compare April 17, 2024 11:47
await writeFile("sa.json", sa_json);
await exec.exec(GCLOUD_BINARY, ['auth', 'activate-service-account', '--key-file=sa.json']);
await exec.exec(GCLOUD_BINARY, ['container', 'clusters', 'get-credentials', name, '--zone', location, '--project', project]);
const account = JSON.parse(sa_json).client_email; // get the account passed in. this will prevent issues when multiple accounts have been activated
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is new

location,
"--project",
project,
"--account",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is new

index.js Outdated
await deleteFile("sa.json");
}

function unsetGloudariables() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and with typo's

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hehe 🙈
you're very right

index.js Outdated
@@ -164,6 +193,8 @@ async function run() {
const context = github.context;
await status("pending");

unsetGloudariables();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new

@genisd genisd force-pushed the fix/set-location-of-credentials-explicitly branch from 8153487 to 6a0643b Compare April 17, 2024 11:59
@genisd genisd merged commit fbe292b into master Apr 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants