From 1069d6b25076a09f1f55075c3b3c09012b82b5e3 Mon Sep 17 00:00:00 2001 From: "Sam Smith (Microsoft)" Date: Mon, 1 Mar 2021 07:48:41 -0500 Subject: [PATCH] Added InnerPowerShell@1 support --- .../StepsProcessing.cs | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/AzurePipelinesToGitHubActionsConverter.Core/PipelinesToActionsConversion/StepsProcessing.cs b/src/AzurePipelinesToGitHubActionsConverter.Core/PipelinesToActionsConversion/StepsProcessing.cs index ea9de2dc..63e7d906 100644 --- a/src/AzurePipelinesToGitHubActionsConverter.Core/PipelinesToActionsConversion/StepsProcessing.cs +++ b/src/AzurePipelinesToGitHubActionsConverter.Core/PipelinesToActionsConversion/StepsProcessing.cs @@ -1687,6 +1687,31 @@ public GitHubActions.Step CreateHugoStep(AzurePipelines.Step step) return gitHubStep; } + private GitHubActions.Step CreateInnerPowershellStep(AzurePipelines.Step step) + { + + //From: + //- task: InlinePowershell@1 + // displayName: 'old Powershell task' + // inputs: + // Script: | + // Write-Host 'Hello World' + + //To: + //- name: old Powershell task + // run: | + // Write-Host 'Hello World' + // shell: powershell + + + string script = GetStepInput(step, "script"); + step.script = script; + + GitHubActions.Step gitHubStep = CreateScriptStep("powershell", step); + + return gitHubStep; + } + //TODO: Finish this Kubernetes Step //public GitHubActions.Step CreateKubernetesStep(AzurePipelines.Step step) //{ @@ -2313,31 +2338,6 @@ private GitHubActions.Step CreateAzurePowershellStep(AzurePipelines.Step step) return gitHubStep; } - private GitHubActions.Step CreateInnerPowershellStep(AzurePipelines.Step step) - { - - //From: - //- task: InlinePowershell@1 - // displayName: 'old Powershell task' - // inputs: - // Script: | - // Write-Host 'Hello World' - - //To: - //- name: old Powershell task - // run: | - // Write-Host 'Hello World' - // shell: powershell - - - string script = GetStepInput(step, "script"); - step.script = script; - - GitHubActions.Step gitHubStep = CreateScriptStep("powershell", step); - - return gitHubStep; - } - private GitHubActions.Step CreateXamarinAndroidStep(AzurePipelines.Step step) { //coming from: