Add GitHub Action and make targets to validate bicep #5
Workflow file for this run
This file contains 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 dev-infrastructure | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'dev-infrastructure/**' | |
jobs: | |
validate_bicep: | |
permissions: | |
contents: 'read' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
fetch-depth: 1 | |
sparse-checkout: dev-infrastructure | |
- name: 'az bicep format and lint' | |
run: | | |
make fmt | |
make lint | |
- name: Check for uncommitted changes | |
run: | | |
git diff --exit-code || (echo "::error::Uncommitted changes detected in OpenAPI spec. Please regenerate and commit them." && exit 1) |