From 00e9eb41a4db46ab82bdc7355e9729cb7895f79d Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Thu, 23 Jan 2025 08:46:14 +0100 Subject: [PATCH] initial commit --- .gitea/workflows/container.yaml | 12 ++++++++++++ .gitignore | 3 +++ Containerfile | 30 ++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 .gitea/workflows/container.yaml create mode 100644 .gitignore create mode 100644 Containerfile diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml new file mode 100644 index 0000000..e48b3fd --- /dev/null +++ b/.gitea/workflows/container.yaml @@ -0,0 +1,12 @@ +name: Build Multiarch Container Image +on: [push] +jobs: + call-reusable-workflow: + uses: container/multiarch-build-workflow/.gitea/workflows/build.yaml@main + with: + repository: ${{ gitea.repository }} + ref_name: ${{ gitea.ref_name }} + sha: ${{ gitea.sha }} + registry_url: ${{ secrets.REGISTRY_URL }} + registry_user: ${{ secrets.REGISTRY_USER }} + registry_pw: ${{ secrets.REGISTRY_PW }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..af0faab --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*~ +.DS_Store +*.swp diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..d41ea52 --- /dev/null +++ b/Containerfile @@ -0,0 +1,30 @@ +FROM docker.io/alpine:3.21 AS builder + +RUN apk --no-cache add \ + curl + +ENV GODOT_VERSION=4.3 +ENV GODOT_TEMPLATES_HASH=f5f10dbaf56a7908349e64b94ea8c2c93c2cc11fb1014c9565b68a2bb437b922 +ENV GODOT_HASH_x86_64=7de56444b130b10af84d19c7e0cf63cf9e9937ee4ba94364c3b7dd114253ca21 +ENV GODOT_HASH_aarch64=baaf0b753b86ef52e10c11cc7f65c0bc4696ec793ee052ea88360b31ef5462a2 + +RUN curl -L -O https://github.com/godotengine/godot/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_export_templates.tpz +RUN eval "echo \"\${GODOT_TEMPLATES_HASH} Godot_v$GODOT_VERSION-stable_export_templates.tpz\" | sha256sum -c -" || exit 1 +RUN mkdir -p /export_templates/$GODOT_VERSION.stable +RUN unzip -j Godot_v$GODOT_VERSION-stable_export_templates.tpz -d /export_templates/$GODOT_VERSION.stable/ + +RUN curl -L -O https://github.com/godotengine/godot/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_linux.$(arch).zip +RUN eval "echo \"\${GODOT_HASH_$(arch)} Godot_v$GODOT_VERSION-stable_linux.$(arch).zip\" | sha256sum -c -" || exit 1 +RUN unzip Godot_v$GODOT_VERSION-stable_linux.$(arch).zip -d /src +RUN mv /src/Godot_v$GODOT_VERSION-stable_linux.$(arch) /src/godot + +FROM docker.io/debian:bookworm-slim + +RUN apt-get update \ + && apt-get install -y \ + libfontconfig1 + +COPY --from=builder /src/godot /bin/godot +COPY --from=builder /export_templates/ /root/.local/share/godot/export_templates/ + +ENTRYPOINT ["godot", "--headless", "--path", "/src", "--export-release"]