@@ -8,26 +8,27 @@ permissions:
8
8
contents : read
9
9
id-token : write
10
10
pull-requests : write
11
- jobs :
12
- build :
13
- runs-on : ubuntu-latest
14
- strategy :
15
- matrix :
16
- python-version : ["3.11"]
17
- steps :
18
- - uses : actions/checkout@v4
19
-
20
- - name : Set up Python ${{ matrix.python-version }}
21
- uses : actions/setup-python@v3
22
- with :
23
- python-version : ${{ matrix.python-version }}
24
-
25
- - name : Install dependencies
26
- run : |
27
- python -m pip install --upgrade pip
28
- pip install -r src/App/requirements.txt
29
- pip install flake8 # Ensure flake8 is installed explicitly
30
-
31
- - name : Run flake8 and pylint
32
- run : |
33
- flake8 --config=.flake8 src/App/backend # Specify the directory to lint
11
+ jobs :
12
+ template_validation_job :
13
+ runs-on : ubuntu-latest
14
+ environment : dev
15
+ name : Template validation
16
+ steps :
17
+ # Step 1: Checkout the code from your repository
18
+ - name : Checkout code
19
+ uses : actions/checkout@v4
20
+ # Step 2: Validate the Azure template using microsoft/template-validation-action
21
+ - name : Validate Azure Template
22
+
23
+ id : validation
24
+ env :
25
+ AZURE_CLIENT_ID : ${{ secrets.AZURE_CLIENT_ID }}
26
+ AZURE_CLIENT_SECRET : ${{ secrets.AZURE_CLIENT_SECRET }}
27
+ AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
28
+ AZURE_SUBSCRIPTION_ID : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
29
+ AZURE_ENV_NAME : ${{ secrets.AZURE_ENV_NAME }}
30
+ AZURE_LOCATION : ${{ secrets.AZURE_LOCATION }}
31
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
+ # Step 3: Print the result of the validation
33
+ - name : Print result
34
+ run : cat ${{ steps.validation.outputs.resultFile }}
0 commit comments