Skip to content

Commit

Permalink
update validate bicep
Browse files Browse the repository at this point in the history
Signed-off-by: sk593 <[email protected]>
  • Loading branch information
sk593 committed Jul 16, 2024
1 parent 40f6401 commit 618c7da
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .github/scripts/validate_bicep.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ def validate_file(f):
stderr = result.stderr.decode("utf-8")
exitcode = result.returncode

warning_prefix = "WARNING: The following experimental Bicep features"
if stderr.startswith(warning_prefix):
stderr = ""
exitcode = 0

if exitcode != 0:
failures.append(f)
print(stderr, flush=True)
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/validate-bicep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
name: Validate Bicep Code
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Parse release version and set environment variables
run: python ./.github/scripts/get_docs_version.py
- name: Download rad-bicep
run: |
oras pull ghcr.io/radius-project/radius/bicep/rad-bicep/linux-x64:latest
chmod +x rad-bicep
./rad-bicep --version
- name: Verify Bicep files
run: python ./.github/scripts/validate_bicep.py
- name: Check out repo
uses: actions/checkout@v4
- name: Setup and verify bicep CLI
run: |
curl -Lo rad-bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
chmod +x ./rad-bicep
bicep --version
- name: Verify Bicep files
run: ./build/validate-bicep.sh
env:
BICEP_PATH: './rad-bicep'

0 comments on commit 618c7da

Please sign in to comment.