Skip to content

Commit 87193da

Browse files
committed
rollback to spectral cli
Because of github token and permisson issues Related to: aliencube#221
1 parent 406f4e0 commit 87193da

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

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

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

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

2120
jobs:
2221
build-test:
@@ -50,6 +49,11 @@ jobs:
5049
dotnet new tool-manifest
5150
dotnet tool install SwashBuckle.AspNetCore.Cli
5251
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+
5357
- name: Restore NuGet packages
5458
shell: bash
5559
run: |
@@ -60,17 +64,13 @@ jobs:
6064
run: |
6165
dotnet build
6266
63-
- name: Create openapi.json
67+
- name: Lint OpenAPI doc
6468
shell: bash
65-
run: |
69+
run: |
6670
API_VERSION=$(grep -oP 'public const string Version = "\K[^"]+' ./src/AzureOpenAIProxy.ApiApp/Constants.cs)
6771
dotnet swagger tofile --output ./openapi.json ./src/AzureOpenAIProxy.ApiApp/bin/Debug/net8.0/AzureOpenAIProxy.ApiApp.dll $API_VERSION
6872
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 }}
73+
spectral lint -f json -f github-actions -F warn openapi.json
7474
7575
- name: Install playwright
7676
shell: pwsh

.github/workflows/azure-dev.yml

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

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

1615
jobs:
1716
build-test-deploy:
@@ -63,6 +62,11 @@ jobs:
6362
run: |
6463
dotnet new tool-manifest
6564
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
6670
6771
- name: Restore NuGet packages
6872
shell: bash
@@ -74,18 +78,13 @@ jobs:
7478
run: |
7579
dotnet build -c Release
7680
77-
- name: Create openapi.json
81+
- name: Lint OpenAPI doc
7882
shell: bash
79-
run: |
83+
run: |
8084
API_VERSION=$(grep -oP 'public const string Version = "\K[^"]+' ./src/AzureOpenAIProxy.ApiApp/Constants.cs)
8185
dotnet swagger tofile --output ./openapi.json ./src/AzureOpenAIProxy.ApiApp/bin/Debug/net8.0/AzureOpenAIProxy.ApiApp.dll $API_VERSION
8286
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-
87+
spectral lint -f json -f github-actions -F warn openapi.json
8988
9089
- name: Test solution
9190

0 commit comments

Comments
 (0)