diff --git a/.github/workflows/avm.platform.toggle-avm-workflows.yml b/.github/workflows/avm.platform.toggle-avm-workflows.yml index 2fec7d3020..04381bea14 100644 --- a/.github/workflows/avm.platform.toggle-avm-workflows.yml +++ b/.github/workflows/avm.platform.toggle-avm-workflows.yml @@ -37,7 +37,7 @@ jobs: shell: pwsh run: | # Load used functions - . (Join-Path $env:GITHUB_WORKSPACE 'avm' 'utilities' 'pipelines' 'platform' 'Switch-WorkflowSate.ps1') + . (Join-Path $env:GITHUB_WORKSPACE 'avm' 'utilities' 'pipelines' 'platform' 'Switch-WorkflowState.ps1') $functionInput = @{ RepositoryOwner = '${{ github.repository_owner }}' @@ -51,4 +51,4 @@ jobs: Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose # Get the modified child resources - Switch-WorkflowSate @functionInput -Verbose + Switch-WorkflowState @functionInput -Verbose diff --git a/avm/utilities/pipelines/platform/Switch-WorkflowSate.ps1 b/avm/utilities/pipelines/platform/Switch-WorkflowState.ps1 similarity index 84% rename from avm/utilities/pipelines/platform/Switch-WorkflowSate.ps1 rename to avm/utilities/pipelines/platform/Switch-WorkflowState.ps1 index 9b7b2929eb..c5a5a703bf 100644 --- a/avm/utilities/pipelines/platform/Switch-WorkflowSate.ps1 +++ b/avm/utilities/pipelines/platform/Switch-WorkflowState.ps1 @@ -24,26 +24,26 @@ Optional. A regex pattern that should not match against the workflow names. Defa Optional. The GitHub PAT token to use for authentication when interacting with GitHub. If not provided, the PAT must be available in the environment variable 'GH_TOKEN' .EXAMPLE -Switch-WorkflowSate -RepositoryOwner 'Paul' -RepositoryName 'bicep-registry-modules' -TargetState 'enable' -GitHubToken ('iAmAToken' | ConvertTo-SecureString -AsPlainText -Force) +Switch-WorkflowState -RepositoryOwner 'Paul' -RepositoryName 'bicep-registry-modules' -TargetState 'enable' -GitHubToken ('iAmAToken' | ConvertTo-SecureString -AsPlainText -Force) Enable any AVM res/ptn workflow in the [Paul/bicep-registry-modules] repository that is not in state 'active' using a custom GitHub PAT token. .EXAMPLE -Switch-WorkflowSate -RepositoryOwner 'Paul' -RepositoryName 'bicep-registry-modules' -TargetState 'disable' +Switch-WorkflowState -RepositoryOwner 'Paul' -RepositoryName 'bicep-registry-modules' -TargetState 'disable' Disable any workflow in the [Paul/bicep-registry-modules] repository that has the state 'active', assuming you have a GitHub PAT token 'GH_TOKEN' set in your environment. .EXAMPLE -Switch-WorkflowSate -RepositoryOwner 'Paul' -RepositoryName 'bicep-registry-modules' -TargetState 'disable' -IncludePattern 'avm\.res\.network\.' +Switch-WorkflowState -RepositoryOwner 'Paul' -RepositoryName 'bicep-registry-modules' -TargetState 'disable' -IncludePattern 'avm\.res\.network\.' Disable any workflow with a naming matching [avm.res.network*] in the [Paul/bicep-registry-modules] repository that has the state 'active', assuming you have a GitHub PAT token 'GH_TOKEN' set in your environment. .EXAMPLE -Switch-WorkflowSate -RepositoryOwner 'Paul' -RepositoryName 'bicep-registry-modules' -TargetState 'disable' -IncludePattern 'avm\.res\.network' -ExlcudePattern 'avm\.res\.network\.virtual-network' +Switch-WorkflowState -RepositoryOwner 'Paul' -RepositoryName 'bicep-registry-modules' -TargetState 'disable' -IncludePattern 'avm\.res\.network' -ExlcudePattern 'avm\.res\.network\.virtual-network' Disable any workflow with a naming matching [avm.res.network*] but exluding those that match the name [avm.res.network.virtual-network] in the [Paul/bicep-registry-modules] repository that has the state 'active', assuming you have a GitHub PAT token 'GH_TOKEN' set in your environment. #> -function Switch-WorkflowSate { +function Switch-WorkflowState { [CmdletBinding()] param (