-
Notifications
You must be signed in to change notification settings - Fork 81
62 lines (47 loc) · 1.93 KB
/
Copy pathexternal-integration.yml
File metadata and controls
62 lines (47 loc) · 1.93 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
name: External Integration
on:
pull_request:
types: [opened, synchronize, labeled]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
azure-rest-api-specs:
name: Azure REST API Specs
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'int:azure-specs') || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup
- name: Install dependencies
run: pnpm install
- name: Build and pack TypeSpec Azure packages
run: |
pnpm --filter "!@azure-tools/typespec-azure-website" --filter "!@azure-tools/typespec-azure-playground-*" --filter "!@typespec/playground-website" --filter="!./core/" -r build
pnpm chronus pack --pack-destination ./tgz-packages
# Also pack TypeSpec core packages
cd core
pnpm chronus pack --pack-destination ../tgz-packages --exclude standalone
cd ..
echo "Created tgz packages:"
ls -la ./tgz-packages/
cd core/packages/tsp-integration
npm link
- name: Checkout
run: tsp-integration azure-specs --stage checkout
- name: Patch package.json
run: tsp-integration azure-specs --stage patch --stage install --tgz-dir ./tgz-packages
- name: Run TypeSpec validation in azure-rest-api-specs
run: tsp-integration azure-specs --stage validate
- name: Check for git changes
if: success() || failure() # Still run this step even if validation fails to ensure as much information as possible
run: tsp-integration azure-specs --stage validate:clean