|
|
|
@ -14,18 +14,18 @@ jobs:
|
|
|
|
|
permissions: read-all
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout repository
|
|
|
|
|
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
|
|
|
|
|
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
|
|
|
|
|
with:
|
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
|
|
|
- name: Setup .NET
|
|
|
|
|
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # tag=v3
|
|
|
|
|
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3
|
|
|
|
|
with:
|
|
|
|
|
dotnet-version: '7.0.x'
|
|
|
|
|
- name: Generate openapi.json
|
|
|
|
|
run: dotnet test tests/Jellyfin.Server.Integration.Tests/Jellyfin.Server.Integration.Tests.csproj -c Release --filter "Jellyfin.Server.Integration.Tests.OpenApiSpecTests"
|
|
|
|
|
- name: Upload openapi.json
|
|
|
|
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
|
|
|
|
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
|
|
|
|
with:
|
|
|
|
|
name: openapi-head
|
|
|
|
|
retention-days: 14
|
|
|
|
@ -39,7 +39,7 @@ jobs:
|
|
|
|
|
permissions: read-all
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout repository
|
|
|
|
|
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
|
|
|
|
|
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
|
|
|
|
|
with:
|
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
|
|
@ -51,13 +51,13 @@ jobs:
|
|
|
|
|
ANCESTOR_REF=$(git merge-base upstream/${{ github.base_ref }} origin/${{ github.head_ref }})
|
|
|
|
|
git checkout --progress --force $ANCESTOR_REF
|
|
|
|
|
- name: Setup .NET
|
|
|
|
|
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # tag=v3
|
|
|
|
|
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3
|
|
|
|
|
with:
|
|
|
|
|
dotnet-version: '7.0.x'
|
|
|
|
|
- name: Generate openapi.json
|
|
|
|
|
run: dotnet test tests/Jellyfin.Server.Integration.Tests/Jellyfin.Server.Integration.Tests.csproj -c Release --filter "Jellyfin.Server.Integration.Tests.OpenApiSpecTests"
|
|
|
|
|
- name: Upload openapi.json
|
|
|
|
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
|
|
|
|
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
|
|
|
|
with:
|
|
|
|
|
name: openapi-base
|
|
|
|
|
retention-days: 14
|
|
|
|
@ -76,12 +76,12 @@ jobs:
|
|
|
|
|
- openapi-base
|
|
|
|
|
steps:
|
|
|
|
|
- name: Download openapi-head
|
|
|
|
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
|
|
|
|
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
|
|
|
|
with:
|
|
|
|
|
name: openapi-head
|
|
|
|
|
path: openapi-head
|
|
|
|
|
- name: Download openapi-base
|
|
|
|
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
|
|
|
|
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
|
|
|
|
with:
|
|
|
|
|
name: openapi-base
|
|
|
|
|
path: openapi-base
|
|
|
|
@ -103,14 +103,14 @@ jobs:
|
|
|
|
|
body="${body//$'\r'/'%0D'}"
|
|
|
|
|
echo ::set-output name=body::$body
|
|
|
|
|
- name: Find difference comment
|
|
|
|
|
uses: peter-evans/find-comment@034abe94d3191f9c89d870519735beae326f2bdb # v2
|
|
|
|
|
uses: peter-evans/find-comment@034abe94d3191f9c89d870519735beae326f2bdb # v2.3.0
|
|
|
|
|
id: find-comment
|
|
|
|
|
with:
|
|
|
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
|
|
|
direction: last
|
|
|
|
|
body-includes: openapi-diff-workflow-comment
|
|
|
|
|
- name: Reply or edit difference comment (changed)
|
|
|
|
|
uses: peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d # v2
|
|
|
|
|
uses: peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d # v2.1.1
|
|
|
|
|
if: ${{ steps.read-diff.outputs.body != '' }}
|
|
|
|
|
with:
|
|
|
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
|
|
@ -125,7 +125,7 @@ jobs:
|
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
- name: Edit difference comment (unchanged)
|
|
|
|
|
uses: peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d # v2
|
|
|
|
|
uses: peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d # v2.1.1
|
|
|
|
|
if: ${{ steps.read-diff.outputs.body == '' && steps.find-comment.outputs.comment-id != '' }}
|
|
|
|
|
with:
|
|
|
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
|
|
|