Skip to content

Commit 4c74f01

Browse files
committedAug 24, 2024
Revert "rollback to spectral cli"
This reverts commit 12f800b.
1 parent 12f800b commit 4c74f01

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed
 

‎.github/workflows/azure-dev-build-only.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ on:
1313

1414
permissions:
1515
id-token: write
16-
contents: read
16+
contents: write
1717
issues: write
1818
pull-requests: write
19+
# checks: write
1920

2021
jobs:
2122
build-test:
@@ -49,11 +50,6 @@ jobs:
4950
dotnet new tool-manifest
5051
dotnet tool install SwashBuckle.AspNetCore.Cli
5152
52-
- name: Install Spectral Cli
53-
shell: bash
54-
run: |
55-
curl -L https://raw.github.com/stoplightio/spectral/master/scripts/install.sh | sh
56-
5753
- name: Restore NuGet packages
5854
shell: bash
5955
run: |
@@ -64,13 +60,17 @@ jobs:
6460
run: |
6561
dotnet build
6662
67-
- name: Lint OpenAPI doc
63+
- name: Create openapi.json
6864
shell: bash
69-
run: |
65+
run: |
7066
API_VERSION=$(grep -oP 'public const string Version = "\K[^"]+' ./src/AzureOpenAIProxy.ApiApp/Constants.cs)
7167
dotnet swagger tofile --output ./openapi.json ./src/AzureOpenAIProxy.ApiApp/bin/Debug/net8.0/AzureOpenAIProxy.ApiApp.dll $API_VERSION
7268
73-
spectral lint -f json -f github-actions -F warn openapi.json
69+
- name: Lint OpenAPI doc
70+
uses: stoplightio/spectral-action@latest
71+
with:
72+
file_glob: './openapi.json'
73+
repo_token: ${{ secrets.GH_PAT_GRAINED }}
7474

7575
- name: Install playwright
7676
shell: pwsh

‎.github/workflows/azure-dev.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ on:
1010

1111
permissions:
1212
id-token: write
13-
contents: read
13+
contents: write
14+
# checks: write
1415

1516
jobs:
1617
build-test-deploy:
@@ -62,12 +63,7 @@ jobs:
6263
run: |
6364
dotnet new tool-manifest
6465
dotnet tool install SwashBuckle.AspNetCore.Cli
65-
66-
- name: Install Spectral Cli
67-
shell: bash
68-
run: |
69-
curl -L https://raw.github.com/stoplightio/spectral/master/scripts/install.sh | sh
70-
66+
7167
- name: Restore NuGet packages
7268
shell: bash
7369
run: |
@@ -78,13 +74,18 @@ jobs:
7874
run: |
7975
dotnet build -c Release
8076
81-
- name: Lint OpenAPI doc
77+
- name: Create openapi.json
8278
shell: bash
8379
run: |
8480
API_VERSION=$(grep -oP 'public const string Version = "\K[^"]+' ./src/AzureOpenAIProxy.ApiApp/Constants.cs)
8581
dotnet swagger tofile --output ./openapi.json ./src/AzureOpenAIProxy.ApiApp/bin/Debug/net8.0/AzureOpenAIProxy.ApiApp.dll $API_VERSION
8682
87-
spectral lint -f json -f github-actions -F warn openapi.json
83+
- name: Lint OpenAPI doc
84+
uses: stoplightio/spectral-action@latest
85+
with:
86+
file_glob: './openapi.json'
87+
repo_token: ${{ secrets.GH_PAT_GRAINED }}
88+
8889

8990
- name: Test solution
9091

0 commit comments

Comments
 (0)