fix: Clean up hardcoded resource group names and duplicate dashes #87
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Validate Bicep Templates | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'templates/**/*.bicep' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate: | |
| name: Validate Bicep | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/[email protected] | |
| - name: Install Bicep | |
| shell: bash | |
| run: | | |
| curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64 | |
| chmod +x ./bicep | |
| sudo mv ./bicep /usr/local/bin/bicep | |
| bicep --version | |
| - name: Bicep Build & Lint All Modules | |
| shell: pwsh | |
| run: | | |
| $output = @() | |
| Get-ChildItem -Recurse -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) | |
| { | |
| foreach ($item in $bicepOutput) { | |
| $output += "$($item) `r`n" | |
| } | |
| } | |
| else | |
| { | |
| echo "Bicep Build Successful for File: $_" | |
| } | |
| } | |
| if ($output.length -gt 0) { | |
| throw $output | |
| } |