mirror of
https://github.com/LukeHagar/plex-api-spec.git
synced 2025-12-06 04:20:40 +00:00
Merged the SDK generation into the build step
This commit is contained in:
32
.github/workflows/build-and-copy-pms-spec.yml
vendored
32
.github/workflows/build-and-copy-pms-spec.yml
vendored
@@ -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
|
||||
56
.github/workflows/build-and-push-pms-spec.yml
vendored
Normal file
56
.github/workflows/build-and-push-pms-spec.yml
vendored
Normal file
@@ -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 }}
|
||||
|
||||
31
.github/workflows/sdk_generation.yaml
vendored
31
.github/workflows/sdk_generation.yaml
vendored
@@ -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 * * * *
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- .github/workflows/sdk_generation.yaml
|
||||
- output/plex-media-server-spec-dereferenced.yaml
|
||||
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 }}
|
||||
Reference in New Issue
Block a user