Skip to content

feat: add bicep file linting #2

feat: add bicep file linting

feat: add bicep file linting #2

Workflow file for this run

name: Bicep
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bicep
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
- name: Lint Bicep
run: |
find . -type f -name "*.bicep" -print0 | while IFS= read -r -d '' file; do
echo "Linting file: $file"
bicep lint $file --diagnostics-format sarif > bicep.sarif
done
- name: Upload SARIF
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
category: bicep
sarif_file: bicep.sarif