mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
refactor: Standardize template domain configuration to use ${domain} helper
This commit is contained in:
66
.github/workflows/base64-templates.yml
vendored
66
.github/workflows/base64-templates.yml
vendored
@@ -1,66 +0,0 @@
|
||||
name: Generate Base64 Blueprints Table
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
encode-and-comment:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate base64 for blueprints
|
||||
id: generate
|
||||
run: |
|
||||
echo "### 📝 Blueprints Base64 Table" > comment.md
|
||||
echo '' >> comment.md
|
||||
|
||||
echo "You can use the base64 value to import the blueprint into the UI." >> comment.md
|
||||
echo "<details>" >> comment.md
|
||||
echo "<summary>🔍 Show all blueprints base64</summary>" >> comment.md
|
||||
echo '' >> comment.md
|
||||
|
||||
for dir in blueprints/*; do
|
||||
if [ -d "$dir" ]; then
|
||||
TEMPLATE_NAME=$(basename "$dir")
|
||||
|
||||
COMPOSE_FILE="$dir/docker-compose.yml"
|
||||
TEMPLATE_FILE="$dir/template.yml"
|
||||
|
||||
if [ -f "$COMPOSE_FILE" ] && [ -f "$TEMPLATE_FILE" ]; then
|
||||
COMPOSE_CONTENT=$(jq -Rs . < "$COMPOSE_FILE")
|
||||
TEMPLATE_CONTENT=$(jq -Rs . < "$TEMPLATE_FILE")
|
||||
|
||||
JSON="{\"compose\":$COMPOSE_CONTENT,\"config\":$TEMPLATE_CONTENT}"
|
||||
BASE64_JSON=$(echo -n "$JSON" | base64 -w 0)
|
||||
|
||||
echo "#### $TEMPLATE_NAME" >> comment.md
|
||||
echo '' >> comment.md
|
||||
echo '```' >> comment.md
|
||||
echo "$BASE64_JSON" >> comment.md
|
||||
echo '```' >> comment.md
|
||||
echo ''
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo '</details>' >> comment.md
|
||||
|
||||
- name: Post comment to PR
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
if: github.event_name == 'pull_request'
|
||||
with:
|
||||
path: comment.md
|
||||
|
||||
- name: Post comment to commit (fallback)
|
||||
uses: peter-evans/commit-comment@v3
|
||||
if: github.event_name != 'pull_request'
|
||||
with:
|
||||
body-path: comment.md
|
||||
32
.github/workflows/deploy.yml
vendored
32
.github/workflows/deploy.yml
vendored
@@ -1,32 +0,0 @@
|
||||
name: Deploy PR previews
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
- closed
|
||||
|
||||
concurrency: preview-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
deploy-preview:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Si no tienes build, solo copia los archivos
|
||||
- name: Prepare static preview folder
|
||||
run: |
|
||||
mkdir -p preview
|
||||
cp meta.json preview/
|
||||
cp -r blueprints preview/
|
||||
cp index.html preview/
|
||||
|
||||
|
||||
# Despliega el preview usando el action
|
||||
- uses: rossjrw/pr-preview-action@v1
|
||||
with:
|
||||
source-dir: preview
|
||||
Reference in New Issue
Block a user