mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-09-14 11:06:15 +05:00
Some checks are pending
Auto PR to main when version changes / create-pr (push) Waiting to run
Build Docker images / build-and-push-cloud-image (push) Waiting to run
Build Docker images / build-and-push-schedule-image (push) Waiting to run
Build Docker images / build-and-push-server-image (push) Waiting to run
Dokploy Docker Build / docker-amd (push) Waiting to run
Dokploy Docker Build / docker-arm (push) Waiting to run
Dokploy Docker Build / combine-manifests (push) Blocked by required conditions
Dokploy Docker Build / generate-release (push) Blocked by required conditions
autofix.ci / format (push) Waiting to run
Dokploy Monitoring Build / docker-amd (push) Waiting to run
Dokploy Monitoring Build / docker-arm (push) Waiting to run
Dokploy Monitoring Build / combine-manifests (push) Blocked by required conditions
Update the version retrieval command in the GitHub Actions workflow to strip the 'v' prefix from the version number in package.json. This change ensures that the version format is consistent for downstream processes.
81 lines
2.7 KiB
YAML
81 lines
2.7 KiB
YAML
name: Sync version to MCP and CLI repos
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
sync-version:
|
|
name: Sync version to external repos
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Dokploy repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get version
|
|
id: get_version
|
|
run: |
|
|
VERSION=$(jq -r .version apps/dokploy/package.json | sed 's/^v//')
|
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
echo "Version: $VERSION"
|
|
|
|
- name: Sync version to MCP repository
|
|
run: |
|
|
git clone https://x-access-token:${{ secrets.DOCS_SYNC_TOKEN }}@github.com/dokploy/mcp.git /tmp/mcp-repo
|
|
cd /tmp/mcp-repo
|
|
|
|
# Regenerate tools from latest OpenAPI spec
|
|
npm install -g pnpm
|
|
pnpm install
|
|
pnpm run fetch-openapi
|
|
pnpm run generate
|
|
|
|
# Bump version after install so pnpm install doesn't overwrite it
|
|
jq --arg v "${{ steps.get_version.outputs.version }}" '.version = $v' package.json > package.json.tmp
|
|
mv package.json.tmp package.json
|
|
|
|
git config user.name "Dokploy Bot"
|
|
git config user.email "bot@dokploy.com"
|
|
|
|
git add -A
|
|
git commit -m "chore: bump version to ${{ steps.get_version.outputs.version }}" \
|
|
-m "Source: ${{ github.repository }}@${{ github.sha }}" \
|
|
-m "Release: ${{ github.event.release.html_url }}" \
|
|
--allow-empty
|
|
|
|
git push
|
|
|
|
|
|
- name: Sync version to CLI repository
|
|
run: |
|
|
git clone https://x-access-token:${{ secrets.DOCS_SYNC_TOKEN }}@github.com/dokploy/cli.git /tmp/cli-repo
|
|
|
|
cd /tmp/cli-repo
|
|
|
|
# Copy latest openapi spec and regenerate commands
|
|
cp ${{ github.workspace }}/openapi.json ./openapi.json
|
|
npm install -g pnpm
|
|
pnpm install
|
|
pnpm run generate
|
|
|
|
# Bump version after install so pnpm install doesn't overwrite it
|
|
if [ -f package.json ]; then
|
|
jq --arg v "${{ steps.get_version.outputs.version }}" '.version = $v' package.json > package.json.tmp
|
|
mv package.json.tmp package.json
|
|
fi
|
|
|
|
git config user.name "Dokploy Bot"
|
|
git config user.email "bot@dokploy.com"
|
|
|
|
git add -A
|
|
git commit -m "chore: bump version to ${{ steps.get_version.outputs.version }}" \
|
|
-m "Source: ${{ github.repository }}@${{ github.sha }}" \
|
|
-m "Release: ${{ github.event.release.html_url }}" \
|
|
--allow-empty
|
|
|
|
git push
|
|
|
|
echo "CLI repo synced to version ${{ steps.get_version.outputs.version }}"
|
|
|