mirror of
https://github.com/ditkrg/k8s-set-context.git
synced 2026-01-22 22:06:49 +00:00
adding spike env var
This commit is contained in:
parent
2f6bfda1e2
commit
4da86321ca
@ -9,7 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.run = void 0;
|
|
||||||
const core = require("@actions/core");
|
const core = require("@actions/core");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
@ -114,9 +113,9 @@ function run() {
|
|||||||
fs.writeFileSync(kubeconfigPath, kubeconfig);
|
fs.writeFileSync(kubeconfigPath, kubeconfig);
|
||||||
fs.chmodSync(kubeconfigPath, '600');
|
fs.chmodSync(kubeconfigPath, '600');
|
||||||
core.exportVariable('KUBECONFIG', kubeconfigPath);
|
core.exportVariable('KUBECONFIG', kubeconfigPath);
|
||||||
|
core.exportVariable('DockerFilePath', 'DockerFilePath/from/input');
|
||||||
console.log('KUBECONFIG environment variable is set');
|
console.log('KUBECONFIG environment variable is set');
|
||||||
yield setContext(kubeconfigPath);
|
yield setContext(kubeconfigPath);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.run = run;
|
|
||||||
run().catch(core.setFailed);
|
run().catch(core.setFailed);
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"main": "lib/run.js",
|
"main": "lib/run.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --outDir .\\lib\\ --rootDir .\\src\\"
|
"build": "tsc --outDir ./lib/ --rootDir ./src/"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"actions",
|
"actions",
|
||||||
|
|||||||
@ -109,6 +109,7 @@ async function run() {
|
|||||||
fs.writeFileSync(kubeconfigPath, kubeconfig);
|
fs.writeFileSync(kubeconfigPath, kubeconfig);
|
||||||
fs.chmodSync(kubeconfigPath, '600');
|
fs.chmodSync(kubeconfigPath, '600');
|
||||||
core.exportVariable('KUBECONFIG', kubeconfigPath);
|
core.exportVariable('KUBECONFIG', kubeconfigPath);
|
||||||
|
core.exportVariable('DockerFilePath', 'DockerFilePath/from/input');
|
||||||
console.log('KUBECONFIG environment variable is set');
|
console.log('KUBECONFIG environment variable is set');
|
||||||
await setContext(kubeconfigPath);
|
await setContext(kubeconfigPath);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user