mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-20 11:08:46 +00:00
chore: enhance version synchronization workflow for MCP and CLI repositories
Update the GitHub Actions workflow to include regeneration of tools from the latest OpenAPI specification and ensure the latest openapi.json is copied to the CLI repository. This improves the consistency and accuracy of the versioning and API documentation across both repositories.
This commit is contained in:
@@ -21,27 +21,30 @@ jobs:
|
|||||||
|
|
||||||
- name: Sync version to MCP repository
|
- name: Sync version to MCP repository
|
||||||
run: |
|
run: |
|
||||||
git clone https://x-access-token:${{ secrets.DOCS_SYNC_TOKEN }}@github.com/dokploy/mcp.git mcp-repo
|
git clone https://x-access-token:${{ secrets.DOCS_SYNC_TOKEN }}@github.com/dokploy/mcp.git mcp-repo
|
||||||
|
cd mcp-repo
|
||||||
cd mcp-repo
|
|
||||||
|
# Bump version
|
||||||
if [ -f package.json ]; then
|
|
||||||
jq --arg v "${{ steps.get_version.outputs.version }}" '.version = $v' package.json > package.json.tmp
|
jq --arg v "${{ steps.get_version.outputs.version }}" '.version = $v' package.json > package.json.tmp
|
||||||
mv package.json.tmp package.json
|
mv package.json.tmp package.json
|
||||||
fi
|
|
||||||
|
# Regenerate tools from latest OpenAPI spec
|
||||||
git config user.name "Dokploy Bot"
|
npm install -g pnpm
|
||||||
git config user.email "[email protected]"
|
pnpm install
|
||||||
|
pnpm run fetch-openapi
|
||||||
git add -A
|
pnpm run generate
|
||||||
git commit -m "chore: bump version to ${{ steps.get_version.outputs.version }}" \
|
|
||||||
-m "Source: ${{ github.repository }}@${{ github.sha }}" \
|
git config user.name "Dokploy Bot"
|
||||||
-m "Release: ${{ github.event.release.html_url }}" \
|
git config user.email "[email protected]"
|
||||||
--allow-empty
|
|
||||||
|
git add -A
|
||||||
git push
|
git commit -m "chore: bump version to ${{ steps.get_version.outputs.version }}" \
|
||||||
|
-m "Source: ${{ github.repository }}@${{ github.sha }}" \
|
||||||
echo "MCP repo synced to version ${{ steps.get_version.outputs.version }}"
|
-m "Release: ${{ github.event.release.html_url }}" \
|
||||||
|
--allow-empty
|
||||||
|
|
||||||
|
git push
|
||||||
|
|
||||||
|
|
||||||
- name: Sync version to CLI repository
|
- name: Sync version to CLI repository
|
||||||
run: |
|
run: |
|
||||||
@@ -49,11 +52,18 @@ jobs:
|
|||||||
|
|
||||||
cd cli-repo
|
cd cli-repo
|
||||||
|
|
||||||
|
# Bump version
|
||||||
if [ -f package.json ]; then
|
if [ -f package.json ]; then
|
||||||
jq --arg v "${{ steps.get_version.outputs.version }}" '.version = $v' package.json > package.json.tmp
|
jq --arg v "${{ steps.get_version.outputs.version }}" '.version = $v' package.json > package.json.tmp
|
||||||
mv package.json.tmp package.json
|
mv package.json.tmp package.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Copy latest openapi spec and regenerate commands
|
||||||
|
cp ../openapi.json ./openapi.json
|
||||||
|
npm install -g pnpm
|
||||||
|
pnpm install
|
||||||
|
pnpm run generate
|
||||||
|
|
||||||
git config user.name "Dokploy Bot"
|
git config user.name "Dokploy Bot"
|
||||||
git config user.email "[email protected]"
|
git config user.email "[email protected]"
|
||||||
|
|
||||||
@@ -66,3 +76,4 @@ jobs:
|
|||||||
git push
|
git push
|
||||||
|
|
||||||
echo "CLI repo synced to version ${{ steps.get_version.outputs.version }}"
|
echo "CLI repo synced to version ${{ steps.get_version.outputs.version }}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user