DodoApp: support Hugo static websites
Change-Id: Ie01f12443e81f3bfc9f7500d443a0399a1fe01ef
diff --git a/apps/app-runner/Dockerfile.hugo b/apps/app-runner/Dockerfile.hugo
new file mode 100644
index 0000000..490d5c5
--- /dev/null
+++ b/apps/app-runner/Dockerfile.hugo
@@ -0,0 +1,5 @@
+FROM giolekva/hugo:latest
+
+ARG TARGETARCH
+
+COPY app-runner_${TARGETARCH} /usr/bin/app-runner
diff --git a/apps/app-runner/Makefile b/apps/app-runner/Makefile
index 4c2424e..8a8936a 100644
--- a/apps/app-runner/Makefile
+++ b/apps/app-runner/Makefile
@@ -33,3 +33,18 @@
$(podman) manifest create $(repo_name)/app-runner:golang-1.22.0 $(repo_name)/app-runner:golang-1.22.0-arm64 $(repo_name)/app-runner:golang-1.22.0-amd64
$(podman) manifest push $(repo_name)/app-runner:golang-1.22.0 $(manifest_dest)
$(podman) manifest rm $(repo_name)/app-runner:golang-1.22.0
+
+# Hugo
+
+push_hugo_arm64: clean build_arm64
+ $(podman) build --platform linux/arm64 --tag=$(repo_name)/app-runner:hugo-latest-arm64 -f Dockerfile.hugo .
+ $(podman) push $(repo_name)/app-runner:hugo-latest-arm64
+
+push_hugo_amd64: clean build_amd64
+ $(podman) build --platform linux/amd64 --tag=$(repo_name)/app-runner:hugo-latest-amd64 -f Dockerfile.hugo .
+ $(podman) push $(repo_name)/app-runner:hugo-latest-amd64
+
+push_hugo: push_hugo_arm64 push_hugo_amd64
+ $(podman) manifest create $(repo_name)/app-runner:hugo-latest $(repo_name)/app-runner:hugo-latest-arm64 $(repo_name)/app-runner:hugo-latest-amd64
+ $(podman) manifest push $(repo_name)/app-runner:hugo-latest $(manifest_dest)
+ $(podman) manifest rm $(repo_name)/app-runner:hugo-latest
diff --git a/apps/app-runner/main.go b/apps/app-runner/main.go
index fb17415..ee2476a 100644
--- a/apps/app-runner/main.go
+++ b/apps/app-runner/main.go
@@ -41,10 +41,12 @@
},
},
},
- RemoteName: "origin",
- ReferenceName: "refs/heads/master",
- Depth: 1,
- InsecureSkipTLS: true,
+ RemoteName: "origin",
+ ReferenceName: "refs/heads/master",
+ Depth: 1,
+ RecurseSubmodules: git.DefaultSubmoduleRecursionDepth,
+ ShallowSubmodules: true,
+ InsecureSkipTLS: true,
})
return err
}