-
Notifications
You must be signed in to change notification settings - Fork 164
70 lines (57 loc) · 1.97 KB
/
dashboard-collect.yml
File metadata and controls
70 lines (57 loc) · 1.97 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Collect dashboard data and upload to Azure Storage.
#
# Runs daily and on manual trigger.
name: Dashboard Collect
permissions:
id-token: write
contents: read
on:
schedule:
# Daily at 6:00 AM UTC
- cron: '0 6 * * *'
workflow_dispatch:
jobs:
collect-and-upload:
name: Collect and upload dashboard data
if: github.repository == 'microsoft/GitHub-Copilot-for-Azure'
runs-on: ubuntu-latest
environment: cideploytest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: scripts/package-lock.json
- name: Build plugin output
run: npm ci --ignore-scripts && npm run build
- name: Install scripts dependencies
run: cd scripts && npm ci
- name: Install tests dependencies
run: cd tests && npm ci
- name: Run non-integration tests
run: cd tests && npm run test:ci
- name: Collect dashboard data
run: npm run dashboard:collect
- name: Azure login
uses: azure/login@532459ea530d8321f2fb9bb10d1e0bcf23869a43 # v3.0.0
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- name: Upload latest.json to Azure Storage
env:
STORAGE_ACCOUNT: ${{ vars.REPORT_STORAGE_ACCOUNT }}
STORAGE_CONTAINER: ${{ vars.NON_INTEGRATION_STORAGE_CONTAINER }}
run: |
az storage blob upload \
--account-name "$STORAGE_ACCOUNT" \
--container-name "$STORAGE_CONTAINER" \
--name "data/latest.json" \
--file dashboard/data/latest.json \
--auth-mode login \
--overwrite