-
Notifications
You must be signed in to change notification settings - Fork 42
37 lines (33 loc) · 1.07 KB
/
arm-template-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: ARM Templates
on:
pull_request:
paths:
- "deploy/azure/*.json"
push:
branches:
- main
- "8.x"
paths:
- "deploy/azure/*.json"
jobs:
lint-arm-ttk:
name: Lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
template: [ "ARM-for-organization-account", "ARM-for-single-account" ]
steps:
- uses: actions/checkout@v4
# Copy files to its own folder because it's what the official ARM-TTK action expects
# Docs https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/test-toolkit#test-parameters
- name: copy file
working-directory: ./deploy/azure
run: |
mkdir ${{ matrix.template }}
cp ${{ matrix.template }}.json ${{ matrix.template }}/azuredeploy.json
- uses: microsoft/action-armttk@v1
name: lint ${{ matrix.template }}
with:
github_token: ${{ secrets.github_token }}
workdir: "./deploy/azure/${{ matrix.template }} -SkipByFile @{ '*' = '*ResourceIds should not contain*' }"