mirror of
https://github.com/Azure/k8s-set-context.git
synced 2026-06-26 08:49:27 +08:00
This commit is contained in:
@@ -108,6 +108,7 @@ export async function run() {
|
||||
const kubeconfigPath = path.join(runnerTempDirectory, `kubeconfig_${Date.now()}`);
|
||||
core.debug(`Writing kubeconfig contents to ${kubeconfigPath}`);
|
||||
fs.writeFileSync(kubeconfigPath, kubeconfig);
|
||||
fs.chmodSync(kubeconfigPath, '600');
|
||||
issueCommand('set-env', { name: 'KUBECONFIG' }, kubeconfigPath);
|
||||
console.log('KUBECONFIG environment variable is set');
|
||||
await setContext(kubeconfigPath);
|
||||
|
||||
Reference in New Issue
Block a user