Add file to act command
Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
10
src/act.ts
10
src/act.ts
@@ -46,12 +46,15 @@ export enum Event {
|
||||
}
|
||||
|
||||
export enum Option {
|
||||
Input = '--input',
|
||||
Workflows = '-W',
|
||||
Job = '-j',
|
||||
Platform = '-P',
|
||||
Secret = '--secret',
|
||||
SecretFile = '--secret-file',
|
||||
Variable = '--var',
|
||||
Workflows = '-W'
|
||||
VariableFile = '--var-file',
|
||||
Input = '--input',
|
||||
InputFile = '--input-file'
|
||||
}
|
||||
|
||||
export interface CommandArgs {
|
||||
@@ -306,8 +309,11 @@ export class Act {
|
||||
`set -o pipefail; ` +
|
||||
`${Act.base} ${commandArgs.options}` +
|
||||
(settings.secrets.length > 0 ? ` ${Option.Secret} ${settings.secrets.map(secret => secret.key).join(` ${Option.Secret} `)}` : ``) +
|
||||
(settings.secretFiles.length > 0 ? ` ${Option.SecretFile} ${settings.secretFiles.map(secretFile => `"${secretFile.path}"`).join(` ${Option.SecretFile} `)}` : ``) +
|
||||
(settings.variables.length > 0 ? ` ${Option.Variable} ${settings.variables.map(variable => (variable.value ? `${variable.key}=${variable.value}` : variable.key)).join(` ${Option.Variable} `)}` : ``) +
|
||||
(settings.variableFiles.length > 0 ? ` ${Option.VariableFile} ${settings.variableFiles.map(variableFile => `"${variableFile.path}"`).join(` ${Option.VariableFile} `)}` : ``) +
|
||||
(settings.inputs.length > 0 ? ` ${Option.Input} ${settings.inputs.map(input => `${input.key}=${input.value}`).join(` ${Option.Input} `)}` : ``) +
|
||||
(settings.inputFiles.length > 0 ? ` ${Option.InputFile} ${settings.inputFiles.map(inputFile => `"${inputFile.path}"`).join(` ${Option.InputFile} `)}` : ``) +
|
||||
(settings.runners.length > 0 ? ` ${Option.Platform} ${settings.runners.map(runner => `${runner.key}=${runner.value}`).join(` ${Option.Platform} `)}` : ``) +
|
||||
` 2>&1 | tee "${logPath}"`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user