diff --git a/alz/azuredevops/pipelines/bicep/templates/ci-template.yaml b/alz/azuredevops/pipelines/bicep/templates/ci-template.yaml index 58c5cf1..fb1acca 100644 --- a/alz/azuredevops/pipelines/bicep/templates/ci-template.yaml +++ b/alz/azuredevops/pipelines/bicep/templates/ci-template.yaml @@ -27,7 +27,7 @@ stages: pwsh: true script: | $output = @() - Get-ChildItem -Recurse -Filter '*.bicep' -Exclude '*.bicep' | Where-Object { $_.FullName -notlike "*\.bicep\*" } | ForEach-Object { + Get-ChildItem -Recurse -File -Filter '*.bicep' | Where-Object { $_.FullName -notlike "*\.bicep\*" } | ForEach-Object { Write-Information "==> Attempting Bicep Build For File: $_" -InformationAction Continue $bicepOutput = bicep build $_.FullName 2>&1 if ($LastExitCode -ne 0) diff --git a/alz/github/actions/bicep/templates/workflows/ci-template.yaml b/alz/github/actions/bicep/templates/workflows/ci-template.yaml index 0820a69..0097e91 100644 --- a/alz/github/actions/bicep/templates/workflows/ci-template.yaml +++ b/alz/github/actions/bicep/templates/workflows/ci-template.yaml @@ -22,7 +22,7 @@ jobs: shell: pwsh run: | $output = @() - Get-ChildItem -Recurse -Filter '*.bicep' -Exclude '*.bicep' | Where-Object { $_.FullName -notlike "*\.bicep\*" } | ForEach-Object { + Get-ChildItem -Recurse -File -Filter '*.bicep' | Where-Object { $_.FullName -notlike "*\.bicep\*" } | ForEach-Object { Write-Information "==> Attempting Bicep Build For File: $_" -InformationAction Continue $bicepOutput = bicep build $_.FullName 2>&1 if ($LastExitCode -ne 0)