save to 0.0.2

This commit is contained in:
moweilin 2024-01-17 23:42:12 +08:00
parent 8823a4078b
commit 986fa0612a
5 changed files with 12 additions and 3 deletions

View File

@ -1,6 +1,6 @@
# 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

View File

@ -4,7 +4,6 @@ inputs:
kubeconfig:
description: 'kubeconfig text'
required: true
default: ''
force:
description: 'force override'
required: false

5
dist/index.js vendored
View File

@ -26593,6 +26593,11 @@ const path = __nccwpck_require__(1017);
try {
// `who-to-greet` input defined in action metadata file
const kubeconfig = core.getInput('kubeconfig');
if(!kubeconfig){
throw {
message: "kubeconfig should not be empty"
}
}
const parentDir = path.join(os.homedir(),".kube")
mkdir(parentDir,{recursive:true})
const configFile = path.join(parentDir,"config")

View File

@ -1,6 +1,6 @@
{
"name": "action-kubernetes-login",
"version": "0.0.1",
"version": "0.0.2",
"type": "commonjs",
"scripts": {
"build": "ncc build src/index.js -o dist"

View File

@ -5,6 +5,11 @@ const path = require('path');
try {
// `who-to-greet` input defined in action metadata file
const kubeconfig = core.getInput('kubeconfig');
if(!kubeconfig){
throw {
message: "kubeconfig should not be empty"
}
}
const parentDir = path.join(os.homedir(),".kube")
mkdir(parentDir,{recursive:true})
const configFile = path.join(parentDir,"config")