From 229b14466384252ba034546095f5c21a932cb6fc Mon Sep 17 00:00:00 2001 From: Steve Keeler Date: Mon, 9 May 2022 20:41:06 -0400 Subject: [PATCH] Fix DeploySubscriptionIds parameter type casting (#282) --- .github/workflows/0-everything.yml | 4 ++-- .github/workflows/6-subscriptions.yml | 3 ++- scripts/deployments/RunWorkflows.ps1 | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/0-everything.yml b/.github/workflows/0-everything.yml index 26633b8a..3b412f51 100644 --- a/.github/workflows/0-everything.yml +++ b/.github/workflows/0-everything.yml @@ -107,10 +107,10 @@ jobs: -NvaPassword (ConvertTo-SecureString -String '${{secrets.NVA_PASSWORD}} '-AsPlainText -Force) - name: Deploy Subscriptions - if: github.event.inputs.subscriptionIds != '' + if: github.event.inputs.subscriptionIds != null run: | ./RunWorkflows.ps1 ` - -DeploySubscriptionIds '${{github.event.inputs.subscriptionIds}}' ` + -DeploySubscriptionIds @( ${{github.event.inputs.subscriptionIds}} ) ` -EnvironmentName '${{github.event.inputs.environmentName}}' ` -LoginServicePrincipalJson (ConvertTo-SecureString -String '${{secrets.ALZ_CREDENTIALS}}' -AsPlainText -Force) ` -GitHubRepo ${env:GITHUB_REPOSITORY} ` diff --git a/.github/workflows/6-subscriptions.yml b/.github/workflows/6-subscriptions.yml index 66e19a71..6cb9de2b 100644 --- a/.github/workflows/6-subscriptions.yml +++ b/.github/workflows/6-subscriptions.yml @@ -41,9 +41,10 @@ jobs: Install-Module powershell-yaml -Force - name: Deploy Subscriptions + if: github.event.inputs.subscriptionIds != null run: | ./RunWorkflows.ps1 ` - -DeploySubscriptionIds '${{github.event.inputs.subscriptionIds}}' ` + -DeploySubscriptionIds @( ${{github.event.inputs.subscriptionIds}} ) ` -EnvironmentName '${{github.event.inputs.environmentName}}' ` -LoginServicePrincipalJson (ConvertTo-SecureString -String '${{secrets.ALZ_CREDENTIALS}}' -AsPlainText -Force) ` -GitHubRepo ${env:GITHUB_REPOSITORY} ` diff --git a/scripts/deployments/RunWorkflows.ps1 b/scripts/deployments/RunWorkflows.ps1 index 57b3542d..cec3aaf7 100644 --- a/scripts/deployments/RunWorkflows.ps1 +++ b/scripts/deployments/RunWorkflows.ps1 @@ -36,7 +36,7 @@ OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. If true, run the NVA hub network workflow. .PARAMETER DeploySubscriptionIds - Comma separated list of subscription ids to run the subscription workflow against. + Comma separated list of quoted subscription ids to run the subscription workflow against. .PARAMETER EnvironmentName The name of the environment to run the workflow against.