发布1.0.1版本

This commit is contained in:
ilovintit
2025-06-05 11:06:59 +08:00
parent e7060a31d2
commit 128952e1ce
3 changed files with 11 additions and 5 deletions
+5 -2
View File
@@ -31,7 +31,10 @@ export async function run(): Promise<void> {
const branch: string = String(process.env.GITHUB_REF_NAME)
console.log('branch:', branch)
//
const configJson = fs.readFileSync(path.join(__dirname, configPath), 'utf8')
const workspace: string = String(process.env.GITHUB_WORKSPACE)
console.log('workspace:', workspace)
//
const configJson = fs.readFileSync(path.join(workspace, configPath), 'utf8')
console.log('configJson:', configJson)
const deployConfigArr = JSON.parse(configJson) as Config[]
console.log('deployConfigArr:', deployConfigArr)
@@ -40,7 +43,7 @@ export async function run(): Promise<void> {
console.log('deployConfig:', deployConfig)
const kc = new k8s.KubeConfig()
kc.loadFromFile(
path.join(__dirname, clusterPath + deployConfig.cluster + '.yaml')
path.join(workspace, clusterPath + deployConfig.cluster + '.yaml')
)
const k8sApi = kc.makeApiClient(k8s.AppsV1Api)
const nowDeployment = await k8sApi.readNamespacedDeployment({