Skip to content

Commit 6a1345a

Browse files
azure template validation
1 parent e21886e commit 6a1345a

1 file changed

Lines changed: 4 additions & 24 deletions

File tree

.github/workflows/azure-dev.yml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,11 @@ jobs:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
2424

25-
# Step 2: Copy root-level files required by template validation into working directory
26-
- name: Copy root files to content-gen
27-
run: |
28-
for file in README.md LICENSE SECURITY.md CODE_OF_CONDUCT.md CONTRIBUTING.md; do
29-
if [ -f "$file" ] && [ ! -f "content-gen/$file" ]; then
30-
cp "$file" "content-gen/$file"
31-
fi
32-
done
33-
34-
# Copy ISSUE_TEMPLATE folder into content-gen/.github/
35-
if [ -d ".github/ISSUE_TEMPLATE" ] && [ ! -d "content-gen/.github/ISSUE_TEMPLATE" ]; then
36-
mkdir -p content-gen/.github/ISSUE_TEMPLATE
37-
cp -r .github/ISSUE_TEMPLATE/* content-gen/.github/ISSUE_TEMPLATE/
38-
fi
39-
40-
# Copy azure-dev.yml workflow into content-gen/.github/workflows/
41-
if [ -f ".github/workflows/azure-dev.yml" ] && [ ! -f "content-gen/.github/workflows/azure-dev.yml" ]; then
42-
mkdir -p content-gen/.github/workflows
43-
cp .github/workflows/azure-dev.yml content-gen/.github/workflows/azure-dev.yml
44-
fi
45-
46-
# Step 3: Validate the Azure template using microsoft/template-validation-action
25+
# Step 2: Validate the Azure template using microsoft/template-validation-action
4726
- name: Validate Azure Template
4827
uses: microsoft/template-validation-action@v0.4.3
4928
with:
50-
workingDirectory: ./content-gen
29+
workingDirectory: .
5130
validateAzd: ${{ vars.TEMPLATE_VALIDATE_AZD }}
5231
useDevContainer: ${{ vars.TEMPLATE_USE_DEV_CONTAINER }}
5332
validateTests: ${{ vars.TEMPLATE_VALIDATE_TESTS }}
@@ -58,8 +37,9 @@ jobs:
5837
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
5938
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
6039
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
40+
AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }}
6141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6242

63-
# Step 4: Print the result of the validation
43+
# Step 3: Print the result of the validation
6444
- name: Print result
6545
run: cat ${{ steps.validation.outputs.resultFile }}

0 commit comments

Comments
 (0)