Skip to content

Commit 2f08b33

Browse files
committed
feat(sync): add job to sync OpenAPI specification to SDK repository
- Implemented a new workflow step to clone the SDK repository and update the OpenAPI specification. - Configured Git user details for the sync operation and added a commit message format that includes source and update timestamp. - Ensured successful synchronization of OpenAPI documentation to the SDK repository.
1 parent 62aeed5 commit 2f08b33

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/sync-openapi-docs.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,24 @@ jobs:
110110
111111
echo "✅ OpenAPI synced to CLI repository successfully"
112112
113+
- name: Sync to SDK repository
114+
run: |
115+
git clone https://x-access-token:${{ secrets.DOCS_SYNC_TOKEN }}@github.com/dokploy/sdk.git sdk-repo
116+
117+
cd sdk-repo
118+
119+
cp -f ../openapi.json openapi.json
120+
121+
git config user.name "Dokploy Bot"
122+
git config user.email "bot@dokploy.com"
123+
124+
git add openapi.json
125+
git commit -m "chore: sync OpenAPI specification [skip ci]" \
126+
-m "Source: ${{ github.repository }}@${{ github.sha }}" \
127+
-m "Updated: $(date -u +'%Y-%m-%d %H:%M:%S UTC')" \
128+
--allow-empty
129+
130+
git push
131+
132+
echo "✅ OpenAPI synced to SDK repository successfully"
133+

0 commit comments

Comments
 (0)