mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-29 06:48:45 +00:00
chore: update OpenAPI sync workflow to always commit changes
- Modified the workflow to always commit the OpenAPI specification to the website repository, even if no changes are detected. - Enhanced the copy command to force overwrite the existing openapi.json file. - Improved commit message formatting by allowing empty commits to ensure consistency in the sync process.
This commit is contained in:
@@ -49,25 +49,21 @@ jobs:
|
|||||||
|
|
||||||
cd website-repo
|
cd website-repo
|
||||||
|
|
||||||
# Copia el openapi.json al website
|
# Copia el openapi.json al website (sobrescribe)
|
||||||
mkdir -p public
|
mkdir -p public
|
||||||
cp ../openapi.json public/openapi.json
|
cp -f ../openapi.json public/openapi.json
|
||||||
|
|
||||||
# Configura git
|
# Configura git
|
||||||
git config user.name "Dokploy Bot"
|
git config user.name "Dokploy Bot"
|
||||||
git config user.email "[email protected]"
|
git config user.email "[email protected]"
|
||||||
|
|
||||||
# Verifica si hay cambios
|
# Agrega y commitea siempre
|
||||||
if git diff --quiet public/openapi.json; then
|
|
||||||
echo "📝 No changes detected in website repo"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Commitea y pushea
|
|
||||||
git add public/openapi.json
|
git add public/openapi.json
|
||||||
git commit -m "chore: sync OpenAPI specification [skip ci]" \
|
git commit -m "chore: sync OpenAPI specification [skip ci]" \
|
||||||
-m "Source: ${{ github.repository }}@${{ github.sha }}" \
|
-m "Source: ${{ github.repository }}@${{ github.sha }}" \
|
||||||
-m "Updated: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
|
-m "Updated: $(date -u +'%Y-%m-%d %H:%M:%S UTC')" \
|
||||||
|
--allow-empty
|
||||||
|
|
||||||
git push
|
git push
|
||||||
|
|
||||||
echo "✅ OpenAPI synced to website successfully"
|
echo "✅ OpenAPI synced to website successfully"
|
||||||
|
|||||||
Reference in New Issue
Block a user