Skip to content

Commit

Permalink
chore: add azd validation workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
manekinekko committed Jun 3, 2024
1 parent 19967b1 commit b0d3687
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/validate-infra.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Validate AZD template
on:
push:
branches: [main]
paths:
- 'infra/**'
pull_request:
branches: [main]
paths:
- 'infra/**'

jobs:
build:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build Bicep for linting
uses: azure/CLI@v2
with:
inlineScript: az config set bicep.use_binary_from_path=false && az bicep build -f infra/main.bicep --stdout

- name: Run Microsoft Security DevOps Analysis
uses: microsoft/security-devops-action@preview
id: msdo
continue-on-error: true
with:
tools: templateanalyzer

- name: Upload alerts to Security tab
if: github.repository_owner == 'Azure-Samples'
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.msdo.outputs.sarifFile }}

0 comments on commit b0d3687

Please sign in to comment.