Skip to content

Meshery Schemas v0.8.128 #13

Meshery Schemas v0.8.128

Meshery Schemas v0.8.128 #13

# This workflow automatically publishes the OpenAPI documentation to the meshery/meshery repository
# It runs on:
# 1. Release publication (when a new release is published)
# 2. Manual trigger via workflow_dispatch
#
# What it does:
# - Builds the OpenAPI specifications from schemas
# - Copies the merged_openapi.yml to meshery/meshery repo at docs/data/openapi.yml
# - Commits and pushes the changes directly to the master branch
#
# This ensures that the Meshery REST API documentation stays in sync with the schemas repository.
name: Publish OpenAPI Docs to Meshery
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
publish-openapi-docs:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout schemas repository
uses: actions/checkout@v6
with:
ref: 'master'
token: ${{ secrets.MESHERY_CI }}
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: '1.25.5'
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
- name: Install dependencies
run: |
npm i
npm i -g @redocly/cli@latest
go install github.com/oapi-codegen/oapi-codegen/v2/cmd/[email protected]
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Build OpenAPI specifications
run: |
make bundle-openapi
- name: Checkout meshery repository
uses: actions/checkout@v6
with:
repository: meshery/meshery
path: meshery
token: ${{ secrets.MESHERY_CI }}
ref: 'master'
- name: Copy OpenAPI specification to meshery repo
run: |
mkdir -p meshery/docs/data
cp _openapi_build/merged_openapi.yml meshery/docs/data/openapi.yml
echo "Copied merged_openapi.yml to meshery/docs/data/openapi.yml"
- name: Pull changes from remote
working-directory: meshery
run: git pull origin master
- name: Commit and push to meshery repository
uses: stefanzweifel/git-auto-commit-action@v7
with:
repository: meshery
commit_message: '[Docs] Update REST API Documentation'
commit_options: '--signoff'
commit_user_name: meshery
commit_user_email: [email protected]
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
file_pattern: docs/data/openapi.yml
branch: master