-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72a6d2f
commit 7e9394f
Showing
2 changed files
with
40 additions
and
61 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Validate Bicep templates | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- 'templates/azure/**' | ||
- 'templates/iotedge-lorawan-starterkit/**' | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- 'templates/azure/**' | ||
- 'templates/iotedge-lorawan-starterkit/**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
validate_bicep_templates: | ||
name: Build and Validate Bicep Templates | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Apply arm-templates label on PR | ||
uses: actions/github-script@v7 | ||
if: ${{ github.event_name == 'pull_request' }} | ||
with: | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['arm-templates'] | ||
}) | ||
- uses: actions/[email protected] | ||
with: | ||
submodules: recursive | ||
|
||
- name: Lint Bicep templates and Generate ARM template | ||
working-directory: templates/azure | ||
run: az bicep build --file azuredeploy.bicep --outfile azuredeploy.json |