From ef119e008e687b7fac456c032ac26c79e022576e Mon Sep 17 00:00:00 2001 From: JasonLandbridge Date: Wed, 2 Oct 2024 13:05:12 +0200 Subject: [PATCH 1/5] Have build step include the redocly referenced file --- bun.lockb | Bin 175175 -> 176295 bytes package.json | 7 ++++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bun.lockb b/bun.lockb index eb247b8069fa6cdd5b8008bbe563e1cbc0c28e13..b5e6d77bef81442ee60792d234aaeaabf23e2410 100755 GIT binary patch delta 1823 zcmY+E3s6%>6oz*%A|x0<0~jEL=LEz_1R6vvC^!mQ0nr&1OQGde8<46Hlv0tPt;RBp z+A!|e@qw?>QX<6YT*EsmiX&CTmQq?DK&L8*%Cuq?g`Q0=t)9uBJ^S5r&z`%lD?R+G zKK?%Wtl0xM)@_Y1UzIX;{exFNar@V+vqhEf2P8exIO~p=9q5`_#~^B^{cAm$$VPo( zk08))EkX_msVCMTG!5FC-3Zx3D}*=^w5pBy8w>I>vJy0gbo)C3(Vaf!iTIkqhtCRA z&bz7Bb(|?s%OZNKrG_Z6DhRu3H?NqjtrXiD9>jG-{@)eMg|rJG9UXp}R{_ZS$vlxexH_u3D5vjm z&X3P-vrfV6iw{MSLCFQqr*j8)oqgD$H^z>pjx9XbaBW76pH0=R?Mout&$sv8iVM8| z>w~J_iz7zQl@r}UEGk)&JM>=Q-MZ&FT|=!20XGHlckfr6&Pw_7$xCHH&=YriTbo$v zXBC+)*;-xu=8#i+??)fqnXHr)-foL3KM_5*8Y6_!xWhQK4WLPz@>Th=Z@0<3uRSPF z?FQzX%PEny4W9aTG6|4=$p}t`}AX<3qML84(>EvUZm^p*iqf) zu{4qSQZMQ5H^%>ccEGOW&<3fp-?8hB@|uWoAzq7{$@C~_T8NT1t*i+eUve)RN3fzy zEMHB6;;@#lZnS(%Pcun0;)obDK4CHXfrrgmE$jSdpYCs1akCxaVqiNUCypH@H;q^r zS;;-JhDY5X`t%t5(QPvobOc206fm071|*>XtcrNoV`0g6TnZkb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ha|l(NxK&4hEYl<(cqVz1!9?K^2-+m z!Y Date: Wed, 2 Oct 2024 13:17:29 +0200 Subject: [PATCH 2/5] Merged the SDK generation into the build step --- .github/workflows/build-and-copy-pms-spec.yml | 32 ----------- .github/workflows/build-and-push-pms-spec.yml | 56 +++++++++++++++++++ .github/workflows/sdk_generation.yaml | 31 ---------- 3 files changed, 56 insertions(+), 63 deletions(-) delete mode 100644 .github/workflows/build-and-copy-pms-spec.yml create mode 100644 .github/workflows/build-and-push-pms-spec.yml delete mode 100644 .github/workflows/sdk_generation.yaml diff --git a/.github/workflows/build-and-copy-pms-spec.yml b/.github/workflows/build-and-copy-pms-spec.yml deleted file mode 100644 index 8df7cd5e..00000000 --- a/.github/workflows/build-and-copy-pms-spec.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Build and Copy Dereferenced Plex Media Server API Spec - -on: - push: - branches: - - main - paths: - - src/** - - workflow_dispatch: - -jobs: - dereference_api: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Project Setup - uses: ./.github/workflows/steps/project-setup - - - name: Dereference Plex Media Server Specification - run: bun run build - - - name: Commit Dereferenced Specification File - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "build: dereferenced Plex Media Server API Spec updated" - skip_checkout: true - skip_fetch: true - add_options: "-f" - file_pattern: "./output/*.yaml" - skip_dirty_check: true \ No newline at end of file diff --git a/.github/workflows/build-and-push-pms-spec.yml b/.github/workflows/build-and-push-pms-spec.yml new file mode 100644 index 00000000..ac6dbe58 --- /dev/null +++ b/.github/workflows/build-and-push-pms-spec.yml @@ -0,0 +1,56 @@ +name: Build and Push Plex Media Server API Spec + +permissions: + checks: write + contents: write + pull-requests: write + statuses: write + +on: + workflow_dispatch: + inputs: + force: + description: Force generation of SDKs + type: boolean + default: false + push: + branches: + - main + paths: + - .github/workflows/sdk_generation.yaml + - src/** + +jobs: + build: + name: Build Open API Spec + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Project Setup + uses: ./.github/workflows/steps/project-setup + + - name: Dereference Plex Media Server Specification + run: bun run build + + - name: Commit Dereferenced Specification File + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "build: dereferenced Plex Media Server API Spec updated" + skip_checkout: true + skip_fetch: true + add_options: "-f" + file_pattern: "./output/*.yaml" + skip_dirty_check: true + generate: + needs: build + name: Push to Speakeasy API + uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 # Already pulls the latest spec version + with: + force: ${{ github.event.inputs.force }} + mode: direct + speakeasy_version: latest + secrets: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} + diff --git a/.github/workflows/sdk_generation.yaml b/.github/workflows/sdk_generation.yaml deleted file mode 100644 index d4f3bf3f..00000000 --- a/.github/workflows/sdk_generation.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: Generate -permissions: - checks: write - contents: write - pull-requests: write - statuses: write -"on": - workflow_dispatch: - inputs: - force: - description: Force generation of SDKs - type: boolean - default: false - schedule: - - cron: 0 0 * * * - push: - branches: - - main - paths: - - .github/workflows/sdk_generation.yaml - - output/** -jobs: - generate: - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 - with: - force: ${{ github.event.inputs.force }} - mode: direct - speakeasy_version: latest - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} From a7223df1261788442531eea5e01ff7a8c35f5410 Mon Sep 17 00:00:00 2001 From: JasonLandbridge Date: Wed, 2 Oct 2024 13:50:34 +0200 Subject: [PATCH 3/5] fixed name --- .github/workflows/build-and-push-pms-spec.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-push-pms-spec.yml b/.github/workflows/build-and-push-pms-spec.yml index ac6dbe58..ecf6f697 100644 --- a/.github/workflows/build-and-push-pms-spec.yml +++ b/.github/workflows/build-and-push-pms-spec.yml @@ -17,7 +17,7 @@ on: branches: - main paths: - - .github/workflows/sdk_generation.yaml + - .github/workflows/build-and-push-pms-spec.yaml - src/** jobs: @@ -45,7 +45,7 @@ jobs: generate: needs: build name: Push to Speakeasy API - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 # Already pulls the latest spec version + uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 with: force: ${{ github.event.inputs.force }} mode: direct From a8c03f3938bd68d1e1123cd7c4249e6630dc85ae Mon Sep 17 00:00:00 2001 From: JasonLandbridge Date: Wed, 2 Oct 2024 13:54:32 +0200 Subject: [PATCH 4/5] fixed name --- .github/workflows/build-and-push-pms-spec.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-push-pms-spec.yml b/.github/workflows/build-and-push-pms-spec.yml index ecf6f697..741aaeb9 100644 --- a/.github/workflows/build-and-push-pms-spec.yml +++ b/.github/workflows/build-and-push-pms-spec.yml @@ -30,10 +30,10 @@ jobs: - name: Project Setup uses: ./.github/workflows/steps/project-setup - - name: Dereference Plex Media Server Specification + - name: Build Plex Media Server Specification run: bun run build - - name: Commit Dereferenced Specification File + - name: Commit Build Specification Files uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: "build: dereferenced Plex Media Server API Spec updated" From a819cc7dedee9daf1733d5f857846870740cb29c Mon Sep 17 00:00:00 2001 From: Jason Landbridge Date: Wed, 2 Oct 2024 20:06:41 +0200 Subject: [PATCH 5/5] Update .github/workflows/build-and-push-pms-spec.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/workflows/build-and-push-pms-spec.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-and-push-pms-spec.yml b/.github/workflows/build-and-push-pms-spec.yml index 741aaeb9..e61f94f6 100644 --- a/.github/workflows/build-and-push-pms-spec.yml +++ b/.github/workflows/build-and-push-pms-spec.yml @@ -53,4 +53,3 @@ jobs: secrets: github_access_token: ${{ secrets.GITHUB_TOKEN }} speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} -