Skip to content

Commit 58ee7ba

Browse files
Merge pull request #167 from microsoft/psl-us-20458
ci: added workflow for telemetry template check in azure.yaml file while …
2 parents c0bdfb1 + 702558c commit 58ee7ba

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: validate template property for telemetry
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- 'azure.yaml'
9+
10+
jobs:
11+
validate-template-property:
12+
name : validate-template-property
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Check for required metadata template line
20+
run: |
21+
if grep -E '^\s*#\s*template:\s*modernize-your-code-solution-accelerator@1\.0' azure.yaml; then
22+
echo "ERROR: 'template' line is commented out in azure.yaml! Please uncomment template line."
23+
exit 1
24+
fi
25+
26+
if ! grep -E '^\s*template:\s*modernize-your-code-solution-accelerator@1\.0' azure.yaml; then
27+
echo "ERROR: Required 'template' line is missing in azure.yaml! Please add template line for telemetry."
28+
exit 1
29+
fi
30+
echo "template line is present and not commented."

0 commit comments

Comments
 (0)