@@ -138,6 +138,8 @@ jobs:
138138 needs : [combine-manifests]
139139 if : github.ref == 'refs/heads/main'
140140 runs-on : ubuntu-latest
141+ outputs :
142+ version : ${{ steps.get_version.outputs.version }}
141143 steps :
142144 - name : Checkout
143145 uses : actions/checkout@v4
@@ -160,3 +162,80 @@ jobs:
160162 prerelease : false
161163 env :
162164 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
165+
166+ sync-version :
167+ needs : [generate-release]
168+ if : github.ref == 'refs/heads/main'
169+ runs-on : ubuntu-latest
170+ steps :
171+ - name : Checkout
172+ uses : actions/checkout@v4
173+
174+ - name : Sync version to MCP repository
175+ run : |
176+ git clone https://x-access-token:${{ secrets.DOCS_SYNC_TOKEN }}@github.com/dokploy/mcp.git /tmp/mcp-repo
177+ cd /tmp/mcp-repo
178+
179+ jq --arg v "${{ needs.generate-release.outputs.version }}" '.version = $v' package.json > package.json.tmp
180+ mv package.json.tmp package.json
181+
182+ npm install -g pnpm
183+ pnpm install
184+ pnpm run fetch-openapi
185+ pnpm run generate
186+
187+ git config user.name "Dokploy Bot"
188+ git config user.email "bot@dokploy.com"
189+ git add -A
190+ git commit -m "chore: bump version to ${{ needs.generate-release.outputs.version }}" \
191+ -m "Source: ${{ github.repository }}@${{ github.sha }}" \
192+ --allow-empty
193+ git push
194+
195+ echo "✅ MCP repo synced to version ${{ needs.generate-release.outputs.version }}"
196+
197+ - name : Sync version to CLI repository
198+ run : |
199+ git clone https://x-access-token:${{ secrets.DOCS_SYNC_TOKEN }}@github.com/dokploy/cli.git /tmp/cli-repo
200+ cd /tmp/cli-repo
201+
202+ jq --arg v "${{ needs.generate-release.outputs.version }}" '.version = $v' package.json > package.json.tmp
203+ mv package.json.tmp package.json
204+
205+ cp ${{ github.workspace }}/openapi.json ./openapi.json
206+ npm install -g pnpm
207+ pnpm install
208+ pnpm run generate
209+
210+ git config user.name "Dokploy Bot"
211+ git config user.email "bot@dokploy.com"
212+ git add -A
213+ git commit -m "chore: bump version to ${{ needs.generate-release.outputs.version }}" \
214+ -m "Source: ${{ github.repository }}@${{ github.sha }}" \
215+ --allow-empty
216+ git push
217+
218+ echo "✅ CLI repo synced to version ${{ needs.generate-release.outputs.version }}"
219+
220+ - name : Sync version to SDK repository
221+ run : |
222+ git clone https://x-access-token:${{ secrets.DOCS_SYNC_TOKEN }}@github.com/dokploy/sdk.git /tmp/sdk-repo
223+ cd /tmp/sdk-repo
224+
225+ jq --arg v "${{ needs.generate-release.outputs.version }}" '.version = $v' package.json > package.json.tmp
226+ mv package.json.tmp package.json
227+
228+ cp ${{ github.workspace }}/openapi.json ./openapi.json
229+ npm install -g pnpm
230+ pnpm install
231+ pnpm run generate
232+
233+ git config user.name "Dokploy Bot"
234+ git config user.email "bot@dokploy.com"
235+ git add -A
236+ git commit -m "chore: bump version to ${{ needs.generate-release.outputs.version }}" \
237+ -m "Source: ${{ github.repository }}@${{ github.sha }}" \
238+ --allow-empty
239+ git push
240+
241+ echo "✅ SDK repo synced to version ${{ needs.generate-release.outputs.version }}"
0 commit comments