Skip to content

Commit 9fce091

Browse files
Merge pull request #560 from microsoft/dev
chore: Down merge from dev
2 parents 9c32b35 + 44e0714 commit 9fce091

224 files changed

Lines changed: 29810 additions & 9553 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: AZD Template Validation
2+
on:
3+
schedule:
4+
- cron: '30 1 * * 4' # Every Thursday at 7:00 AM IST (1:30 AM UTC)
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
id-token: write
10+
pull-requests: write
11+
12+
jobs:
13+
template_validation:
14+
runs-on: ubuntu-latest
15+
name: azd template validation
16+
environment: production
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set timestamp
21+
run: echo "HHMM=$(date -u +'%H%M')" >> $GITHUB_ENV
22+
23+
- uses: microsoft/template-validation-action@v0.4.3
24+
with:
25+
validateAzd: ${{ vars.TEMPLATE_VALIDATE_AZD }}
26+
validateTests: ${{ vars.TEMPLATE_VALIDATE_TESTS }}
27+
useDevContainer: ${{ vars.TEMPLATE_USE_DEV_CONTAINER }}
28+
id: validation
29+
env:
30+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
31+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
32+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
33+
AZURE_ENV_NAME: azd-${{ vars.AZURE_ENV_NAME }}-${{ env.HHMM }}
34+
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
35+
AZURE_ENV_AI_SERVICE_LOCATION: ${{ vars.AZURE_LOCATION }}
36+
AZURE_ENV_MODEL_CAPACITY: 1 # keep low to avoid potential quota issues
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: print result
40+
run: cat ${{ steps.validation.outputs.resultFile }}

.github/workflows/azure-dev.yaml

Lines changed: 46 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,57 @@
1-
name: Azure Template Validation
1+
name: Azure Dev Deploy
2+
23
on:
34
workflow_dispatch:
45

56
permissions:
67
contents: read
78
id-token: write
8-
pull-requests: write
99

1010
jobs:
11-
template_validation_job:
12-
environment: production
11+
deploy:
1312
runs-on: ubuntu-latest
14-
name: Template validation
15-
13+
environment: production
14+
env:
15+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
16+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
17+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
18+
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
19+
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
20+
AZURE_ENV_MODEL_CAPACITY: 1 # keep low to avoid potential quota issues
21+
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
1622
steps:
17-
# Step 1: Checkout the code from your repository
18-
- name: Checkout code
19-
uses: actions/checkout@v5
20-
21-
# Step 2: Validate the Azure template using microsoft/template-validation-action
22-
- name: Validate Azure Template
23-
uses: microsoft/template-validation-action@v0.4.3
24-
id: validation
23+
- name: Checkout Code
24+
uses: actions/checkout@v6
25+
26+
- name: Set timestamp and env name
27+
run: |
28+
HHMM=$(date -u +'%H%M')
29+
echo "AZURE_ENV_NAME=azd-${{ vars.AZURE_ENV_NAME }}-${HHMM}" >> $GITHUB_ENV
30+
31+
- name: Install azd
32+
uses: Azure/setup-azd@v2
33+
34+
- name: Login to Azure
35+
uses: azure/login@v2
2536
with:
26-
useDevContainer: false
27-
env:
28-
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
29-
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
30-
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
31-
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
32-
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34-
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
35-
36-
# Step 3: Print the result of the validation
37-
- name: Print result
38-
run: cat ${{ steps.validation.outputs.resultFile }}
37+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
38+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
39+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
40+
41+
- name: Login to AZD
42+
shell: bash
43+
run: |
44+
azd auth login \
45+
--client-id "$AZURE_CLIENT_ID" \
46+
--federated-credential-provider "github" \
47+
--tenant-id "$AZURE_TENANT_ID"
48+
49+
- name: Provision and Deploy
50+
shell: bash
51+
run: |
52+
if ! azd env select "$AZURE_ENV_NAME"; then
53+
azd env new "$AZURE_ENV_NAME" --subscription "$AZURE_SUBSCRIPTION_ID" --location "$AZURE_LOCATION" --no-prompt
54+
fi
55+
azd config set defaults.subscription "$AZURE_SUBSCRIPTION_ID"
56+
azd env set AZURE_ENV_AI_SERVICE_LOCATION="$AZURE_LOCATION"
57+
azd up --no-prompt

.github/workflows/broken-links-checker.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616

1717
steps:
1818
- name: Checkout Repo
19-
uses: actions/checkout@v5
19+
uses: actions/checkout@v6
2020
with:
2121
fetch-depth: 0
2222

2323
# For PR : Get only changed markdown files
2424
- name: Get changed markdown files (PR only)
2525
id: changed-markdown-files
2626
if: github.event_name == 'pull_request'
27-
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v46
27+
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v46
2828
with:
2929
files: |
3030
**/*.md
@@ -34,7 +34,7 @@ jobs:
3434
- name: Check Broken Links in Changed Markdown Files
3535
id: lychee-check-pr
3636
if: github.event_name == 'pull_request' && steps.changed-markdown-files.outputs.any_changed == 'true'
37-
uses: lycheeverse/lychee-action@v2.6.1
37+
uses: lycheeverse/lychee-action@v2.8.0
3838
with:
3939
args: >
4040
--verbose --no-progress --exclude ^https?://
@@ -47,7 +47,7 @@ jobs:
4747
- name: Check Broken Links in All Markdown Files in Entire Repo (Manual Trigger)
4848
id: lychee-check-manual
4949
if: github.event_name == 'workflow_dispatch'
50-
uses: lycheeverse/lychee-action@v2.6.1
50+
uses: lycheeverse/lychee-action@v2.8.0
5151
with:
5252
args: >
5353
--verbose --no-progress --exclude ^https?://

.github/workflows/build-docker-image.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ jobs:
5959

6060
steps:
6161
- name: Checkout repository
62-
uses: actions/checkout@v5
62+
uses: actions/checkout@v6
6363

6464
- name: Set up Docker Buildx
65-
uses: docker/setup-buildx-action@v3
65+
uses: docker/setup-buildx-action@v4
6666

6767
- name: Get current date
6868
id: date
@@ -110,7 +110,7 @@ jobs:
110110
echo "Base tag: $BASE_TAG, Date tag: $DATE_TAG"
111111
112112
- name: Build and Push ContentProcessor Docker image
113-
uses: docker/build-push-action@v6
113+
uses: docker/build-push-action@v7
114114
with:
115115
context: ./src/ContentProcessor
116116
file: ./src/ContentProcessor/Dockerfile
@@ -120,7 +120,7 @@ jobs:
120120
${{ steps.registry.outputs.ext_registry }}/contentprocessor:${{ env.DATE_TAG }}
121121
122122
- name: Build and Push ContentProcessorAPI Docker image
123-
uses: docker/build-push-action@v6
123+
uses: docker/build-push-action@v7
124124
with:
125125
context: ./src/ContentProcessorAPI
126126
file: ./src/ContentProcessorAPI/Dockerfile
@@ -130,7 +130,7 @@ jobs:
130130
${{ steps.registry.outputs.ext_registry }}/contentprocessorapi:${{ env.DATE_TAG }}
131131
132132
- name: Build and Push ContentProcessorWeb Docker image
133-
uses: docker/build-push-action@v6
133+
uses: docker/build-push-action@v7
134134
with:
135135
context: ./src/ContentProcessorWeb
136136
file: ./src/ContentProcessorWeb/Dockerfile

.github/workflows/codeql.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
2+
# For most projects, this workflow file will not need changing; you simply need
3+
# to commit it to your repository.
4+
#
5+
# You may wish to alter this file to override the set of languages analyzed,
6+
# or to provide custom queries or build logic.
7+
#
8+
# ******** NOTE ********
9+
# We have attempted to detect the languages in your repository. Please check
10+
# the `language` matrix defined below to confirm you have the correct set of
11+
# supported CodeQL languages.
12+
#
13+
name: "CodeQL Advanced"
14+
15+
on:
16+
push:
17+
branches: [ "main", "dev", "demo"]
18+
paths:
19+
- 'src/**/*.py'
20+
- 'src/**/*.js'
21+
- 'src/**/*.ts'
22+
- 'src/**/*.tsx'
23+
- 'tests/**/*.py'
24+
- '.github/workflows/codeql.yml'
25+
pull_request:
26+
branches: [ "main", "dev", "demo" ]
27+
paths:
28+
- 'src/**/*.py'
29+
- 'src/**/*.js'
30+
- 'src/**/*.ts'
31+
- 'src/**/*.tsx'
32+
- 'tests/**/*.py'
33+
- '.github/workflows/codeql.yml'
34+
schedule:
35+
- cron: '44 20 * * 2'
36+
37+
jobs:
38+
analyze:
39+
name: Analyze (${{ matrix.language }})
40+
# Runner size impacts CodeQL analysis time. To learn more, please see:
41+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
42+
# - https://gh.io/supported-runners-and-hardware-resources
43+
# - https://gh.io/using-larger-runners (GitHub.com only)
44+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
45+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
46+
permissions:
47+
# required for all workflows
48+
security-events: write
49+
50+
# required to fetch internal or private CodeQL packs
51+
packages: read
52+
53+
# only required for workflows in private repositories
54+
actions: read
55+
contents: read
56+
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
include:
61+
- language: javascript-typescript
62+
build-mode: none
63+
- language: python
64+
build-mode: none
65+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
66+
# Use `c-cpp` to analyze code written in C, C++ or both
67+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
68+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
69+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
70+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
71+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
72+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
73+
steps:
74+
- name: Checkout repository
75+
uses: actions/checkout@v4
76+
77+
# Initializes the CodeQL tools for scanning.
78+
- name: Initialize CodeQL
79+
uses: github/codeql-action/init@v4
80+
with:
81+
languages: ${{ matrix.language }}
82+
build-mode: ${{ matrix.build-mode }}
83+
# If you wish to specify custom queries, you can do so here or in a config file.
84+
# By default, queries listed here will override any specified in a config file.
85+
# Prefix the list here with "+" to use these queries and those in the config file.
86+
87+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
88+
# queries: security-extended,security-and-quality
89+
90+
# If the analyze step fails for one of the languages you are analyzing with
91+
# "We were unable to automatically build your code", modify the matrix above
92+
# to set the build mode to "manual" for that language. Then modify this step
93+
# to build your code.
94+
# ℹ️ Command-line programs to run using the OS shell.
95+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
96+
- if: matrix.build-mode == 'manual'
97+
shell: bash
98+
run: |
99+
echo 'If you are using a "manual" build mode for one or more of the' \
100+
'languages you are analyzing, replace this with the commands to build' \
101+
'your code, for example:'
102+
echo ' make bootstrap'
103+
echo ' make release'
104+
exit 1
105+
106+
- name: Perform CodeQL Analysis
107+
uses: github/codeql-action/analyze@v4
108+
with:
109+
category: "/language:${{matrix.language}}"

.github/workflows/create-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@v6
1818
with:
1919
ref: ${{ github.event.workflow_run.head_sha }}
2020

21-
- uses: codfish/semantic-release-action@v4
21+
- uses: codfish/semantic-release-action@v5
2222
id: semantic
2323
with:
2424
tag-format: 'v${version}'

.github/workflows/deploy-orchestrator.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ on:
4242
required: false
4343
default: 'GoldenPath-Testing'
4444
type: string
45-
AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID:
46-
description: 'Log Analytics Workspace ID (Optional)'
45+
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
46+
description: 'Log Analytics Workspace Resource ID (Optional)'
4747
required: false
4848
default: ''
4949
type: string
@@ -64,9 +64,7 @@ on:
6464

6565
env:
6666
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
67-
permissions:
68-
contents: read
69-
actions: read
67+
7068
jobs:
7169
docker-build:
7270
uses: ./.github/workflows/job-docker-build.yml
@@ -88,7 +86,7 @@ jobs:
8886
EXP: ${{ inputs.EXP }}
8987
build_docker_image: ${{ inputs.build_docker_image }}
9088
existing_webapp_url: ${{ inputs.existing_webapp_url }}
91-
AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }}
89+
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID: ${{ inputs.AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID }}
9290
AZURE_EXISTING_AI_PROJECT_RESOURCE_ID: ${{ inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }}
9391
docker_image_tag: ${{ needs.docker-build.outputs.IMAGE_TAG }}
9492
run_e2e_tests: ${{ inputs.run_e2e_tests }}

0 commit comments

Comments
 (0)