From 54ec2a2e484c02da3befa692c2f7c5b250ffd533 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 7 Mar 2026 20:44:29 +1300 Subject: [PATCH] Rename template/ to infmap/, add template publish CI job --- .gitea/workflows/build-publish.yaml | 36 +++++++++++++++++-- {template => infmap}/backup.sh | 0 .../config/infrastructure.conf | 0 {template => infmap}/config/service.env | 0 {template => infmap}/destroy.sh | 0 {template => infmap}/docker-compose.yml | 0 {template => infmap}/install-pre.sh | 0 {template => infmap}/install.sh | 0 {template => infmap}/logs.sh | 0 {template => infmap}/ports.sh | 0 {template => infmap}/restore.sh | 0 {template => infmap}/start.sh | 0 {template => infmap}/status.sh | 0 {template => infmap}/stop.sh | 0 {template => infmap}/template_info.env | 0 {template => infmap}/uninstall.sh | 0 16 files changed, 34 insertions(+), 2 deletions(-) rename {template => infmap}/backup.sh (100%) rename {template => infmap}/config/infrastructure.conf (100%) rename {template => infmap}/config/service.env (100%) rename {template => infmap}/destroy.sh (100%) rename {template => infmap}/docker-compose.yml (100%) rename {template => infmap}/install-pre.sh (100%) rename {template => infmap}/install.sh (100%) rename {template => infmap}/logs.sh (100%) rename {template => infmap}/ports.sh (100%) rename {template => infmap}/restore.sh (100%) rename {template => infmap}/start.sh (100%) rename {template => infmap}/status.sh (100%) rename {template => infmap}/stop.sh (100%) rename {template => infmap}/template_info.env (100%) rename {template => infmap}/uninstall.sh (100%) diff --git a/.gitea/workflows/build-publish.yaml b/.gitea/workflows/build-publish.yaml index b8173e5..5092ede 100644 --- a/.gitea/workflows/build-publish.yaml +++ b/.gitea/workflows/build-publish.yaml @@ -1,7 +1,11 @@ name: Build-Publish -run-name: Build and publish infmap Docker image +run-name: Build and publish infmap -on: [push] +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] defaults: run: @@ -68,3 +72,31 @@ jobs: echo "Manifest list created and pushed successfully" fi + + publish-template: + needs: [create-manifest] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dropshell + run: | + curl -fsSL https://getbin.xyz/dropshell-install | bash + ~/.local/bin/dropshell create-config + ~/.local/bin/dropshell install + + - name: Validate template + run: | + if ~/.local/bin/dropshell validate template; then + echo "Template validation passed" + else + echo "Template validation failed" + exit 1 + fi + + - name: Publish template + run: | + if [ "$GITHUB_REF" = "refs/heads/main" ]; then + SOS_WRITE_TOKEN=${{ secrets.SOS_WRITE_TOKEN }} ~/.local/bin/dropshell publish --all ./ + fi diff --git a/template/backup.sh b/infmap/backup.sh similarity index 100% rename from template/backup.sh rename to infmap/backup.sh diff --git a/template/config/infrastructure.conf b/infmap/config/infrastructure.conf similarity index 100% rename from template/config/infrastructure.conf rename to infmap/config/infrastructure.conf diff --git a/template/config/service.env b/infmap/config/service.env similarity index 100% rename from template/config/service.env rename to infmap/config/service.env diff --git a/template/destroy.sh b/infmap/destroy.sh similarity index 100% rename from template/destroy.sh rename to infmap/destroy.sh diff --git a/template/docker-compose.yml b/infmap/docker-compose.yml similarity index 100% rename from template/docker-compose.yml rename to infmap/docker-compose.yml diff --git a/template/install-pre.sh b/infmap/install-pre.sh similarity index 100% rename from template/install-pre.sh rename to infmap/install-pre.sh diff --git a/template/install.sh b/infmap/install.sh similarity index 100% rename from template/install.sh rename to infmap/install.sh diff --git a/template/logs.sh b/infmap/logs.sh similarity index 100% rename from template/logs.sh rename to infmap/logs.sh diff --git a/template/ports.sh b/infmap/ports.sh similarity index 100% rename from template/ports.sh rename to infmap/ports.sh diff --git a/template/restore.sh b/infmap/restore.sh similarity index 100% rename from template/restore.sh rename to infmap/restore.sh diff --git a/template/start.sh b/infmap/start.sh similarity index 100% rename from template/start.sh rename to infmap/start.sh diff --git a/template/status.sh b/infmap/status.sh similarity index 100% rename from template/status.sh rename to infmap/status.sh diff --git a/template/stop.sh b/infmap/stop.sh similarity index 100% rename from template/stop.sh rename to infmap/stop.sh diff --git a/template/template_info.env b/infmap/template_info.env similarity index 100% rename from template/template_info.env rename to infmap/template_info.env diff --git a/template/uninstall.sh b/infmap/uninstall.sh similarity index 100% rename from template/uninstall.sh rename to infmap/uninstall.sh