Skip to content
Draft
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
22 changes: 14 additions & 8 deletions .github/workflows/bundle-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,33 @@ jobs:
npm i -g mint
curl -fsSL https://go.speakeasy.com/cli-install.sh | sh

- name: Bundle OpenAPI spec
- name: Bundle OpenAPI spec (full, for Speakeasy)
run: |
npx @redocly/cli bundle specs/spec.yml -o openapi.yml
npx @redocly/cli bundle full -o openapi.yml

- name: Bundle OpenAPI spec (public, for Mintlify)
run: |
npx @redocly/cli bundle public -o openapi-docs.yml

- name: Run Redocly linter
run: |
npx @redocly/cli lint openapi.yml

- name: Run Mintlify linter
run: |
npx mint openapi-check openapi.yml
npx mint openapi-check openapi-docs.yml

- name: Run Speakeasy linter
run: |
speakeasy lint openapi -s openapi.yml

- name: Upload bundled spec
- name: Upload bundled specs
uses: actions/upload-artifact@v4
with:
name: openapi-spec
path: openapi.yml
path: |
openapi.yml
openapi-docs.yml
if-no-files-found: error
continue-on-error: false

Expand All @@ -68,10 +74,10 @@ jobs:
name: openapi-spec
path: .

- name: Commit Bundled API Spec
- name: Commit Bundled API Specs
run: |
git config --global user.name 'GitHub Action'
git config --global user.email 'action@github.com'
git add openapi.yml
git diff --quiet && git diff --staged --quiet || (git commit -m "chore: update bundled openapi.yml" && git push)
git add openapi.yml openapi-docs.yml
git diff --quiet && git diff --staged --quiet || (git commit -m "chore: update bundled openapi specs" && git push)
continue-on-error: false
Loading