mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-27 23:39:27 +08:00
Supporting both comma and new line as delimiters for manifests
This commit is contained in:
@@ -5,7 +5,7 @@ import * as core from '@actions/core';
|
||||
export let namespace: string = core.getInput('namespace');
|
||||
export const containers: string[] = core.getInput('images').split('\n');
|
||||
export const imagePullSecrets: string[] = core.getInput('imagepullsecrets').split('\n').filter(secret => secret.trim().length > 0);
|
||||
export const manifests = core.getInput('manifests').split('\n');
|
||||
export const manifests = core.getInput('manifests').split(/[\n,]+/);
|
||||
export const canaryPercentage: string = core.getInput('percentage');
|
||||
export const deploymentStrategy: string = core.getInput('strategy');
|
||||
export const trafficSplitMethod: string = core.getInput('traffic-split-method');
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ export async function run() {
|
||||
namespace = 'default';
|
||||
}
|
||||
let action = core.getInput('action');
|
||||
let manifests = manifestsInput.split('\n');
|
||||
let manifests = manifestsInput.split(/[\n,]+/);
|
||||
|
||||
if (action === 'deploy') {
|
||||
let strategy = core.getInput('strategy');
|
||||
|
||||
Reference in New Issue
Block a user