Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge build workflow file and add referenced file to the build #62

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .github/workflows/build-and-copy-pms-spec.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/build-and-push-pms-spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and Push Plex Media Server API Spec

permissions:
checks: write
contents: write
pull-requests: write
statuses: write
Comment on lines +3 to +7
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LukeHagar And by extension this as well?


on:
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
Comment on lines +11 to +15
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LukeHagar Can this be removed as well?

push:
branches:
- main
paths:
- .github/workflows/build-and-push-pms-spec.yaml
- src/**
JasonLandbridge marked this conversation as resolved.
Show resolved Hide resolved

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: Build Plex Media Server Specification
run: bun run build

- name: Commit Build Specification Files
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
with:
force: ${{ github.event.inputs.force }}
Comment on lines +49 to +50
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LukeHagar Can this be removed if this pipeline will never generate an SDK directly?

mode: direct
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
JasonLandbridge marked this conversation as resolved.
Show resolved Hide resolved
31 changes: 0 additions & 31 deletions .github/workflows/sdk_generation.yaml

This file was deleted.

Binary file modified bun.lockb
Binary file not shown.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
"dev": "redocly preview -d=./src",
"preview-docs": "redocly preview-docs src/pms-spec.yaml --config=./redocly.yaml",
"stats": "redocly stats ./src/pms-spec.yaml",
"build": "swagger-cli bundle --dereference ./src/pms-spec.yaml -t yaml -o ./output/plex-media-server-spec-dereferenced.yaml",
"build": "bun run build-referenced & bun run build-dereferenced & wait",
"build-referenced": "redocly bundle ./src/pms-spec.yaml --ext yaml -o ./output/plex-media-server-spec-referenced.yaml",
"build-dereferenced": "swagger-cli bundle --dereference ./src/pms-spec.yaml -t yaml -o ./output/plex-media-server-spec-dereferenced.yaml",
JasonLandbridge marked this conversation as resolved.
Show resolved Hide resolved
"build-watch": "bun run build && chokidar './src/**/*' -c 'bun run build'",
"build-redocly": "redocly bundle ./src/pms-spec.yaml --ext yaml -o ./output/plex-media-server-spec-dereferenced.yaml",
"test": "bun run build && vitest --run",
"type-check": "tsc",
"setup-speakeasy-cli": "curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh",
Expand All @@ -30,7 +31,7 @@
},
"devDependencies": {
"@modyfi/vite-plugin-yaml": "^1.1.0",
"@redocly/cli": "^1.23.1",
"@redocly/cli": "^1.25.4",
"@types/lodash-es": "^4.17.12",
"@types/node": "^22.5.0",
"chokidar-cli": "^3.0.0",
Expand Down