save to 0.0.2
This commit is contained in:
parent
8823a4078b
commit
986fa0612a
|
|
@ -1,6 +1,6 @@
|
||||||
# action-kubernetes-login
|
# action-kubernetes-login
|
||||||
|
|
||||||
This action prints "Hello World" or "Hello" + the name of a person to greet to the log.
|
This action create kubeconfig
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ inputs:
|
||||||
kubeconfig:
|
kubeconfig:
|
||||||
description: 'kubeconfig text'
|
description: 'kubeconfig text'
|
||||||
required: true
|
required: true
|
||||||
default: ''
|
|
||||||
force:
|
force:
|
||||||
description: 'force override'
|
description: 'force override'
|
||||||
required: false
|
required: false
|
||||||
|
|
|
||||||
|
|
@ -26593,6 +26593,11 @@ const path = __nccwpck_require__(1017);
|
||||||
try {
|
try {
|
||||||
// `who-to-greet` input defined in action metadata file
|
// `who-to-greet` input defined in action metadata file
|
||||||
const kubeconfig = core.getInput('kubeconfig');
|
const kubeconfig = core.getInput('kubeconfig');
|
||||||
|
if(!kubeconfig){
|
||||||
|
throw {
|
||||||
|
message: "kubeconfig should not be empty"
|
||||||
|
}
|
||||||
|
}
|
||||||
const parentDir = path.join(os.homedir(),".kube")
|
const parentDir = path.join(os.homedir(),".kube")
|
||||||
mkdir(parentDir,{recursive:true})
|
mkdir(parentDir,{recursive:true})
|
||||||
const configFile = path.join(parentDir,"config")
|
const configFile = path.join(parentDir,"config")
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "action-kubernetes-login",
|
"name": "action-kubernetes-login",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build src/index.js -o dist"
|
"build": "ncc build src/index.js -o dist"
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,11 @@ const path = require('path');
|
||||||
try {
|
try {
|
||||||
// `who-to-greet` input defined in action metadata file
|
// `who-to-greet` input defined in action metadata file
|
||||||
const kubeconfig = core.getInput('kubeconfig');
|
const kubeconfig = core.getInput('kubeconfig');
|
||||||
|
if(!kubeconfig){
|
||||||
|
throw {
|
||||||
|
message: "kubeconfig should not be empty"
|
||||||
|
}
|
||||||
|
}
|
||||||
const parentDir = path.join(os.homedir(),".kube")
|
const parentDir = path.join(os.homedir(),".kube")
|
||||||
mkdir(parentDir,{recursive:true})
|
mkdir(parentDir,{recursive:true})
|
||||||
const configFile = path.join(parentDir,"config")
|
const configFile = path.join(parentDir,"config")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue