Reduce web export build disk usage
This commit is contained in:
@@ -24,8 +24,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Reclaim failed build layers
|
- name: Reclaim failed build layers
|
||||||
run: |
|
run: |
|
||||||
|
rm -f "${IMAGE_TAR}"
|
||||||
docker container prune -f
|
docker container prune -f
|
||||||
docker image prune -f
|
docker image prune -f
|
||||||
|
docker image prune -af --filter "until=24h"
|
||||||
|
docker builder prune -af || true
|
||||||
|
docker system df
|
||||||
|
df -h
|
||||||
|
|
||||||
- name: Build Web game image
|
- name: Build Web game image
|
||||||
run: |
|
run: |
|
||||||
@@ -42,9 +47,14 @@ jobs:
|
|||||||
ssh -o StrictHostKeyChecking=no hz@"$node" "sudo ctr -n k8s.io images import /tmp/step3-web.tar && rm -f /tmp/step3-web.tar"
|
ssh -o StrictHostKeyChecking=no hz@"$node" "sudo ctr -n k8s.io images import /tmp/step3-web.tar && rm -f /tmp/step3-web.tar"
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Clean runner image archive
|
- name: Clean runner build artifacts
|
||||||
if: always()
|
if: always()
|
||||||
run: rm -f "${IMAGE_TAR}"
|
run: |
|
||||||
|
rm -f "${IMAGE_TAR}"
|
||||||
|
if [ -n "${BUILD_TAG}" ]; then
|
||||||
|
docker image rm "step3-web:${BUILD_TAG}" 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
docker image prune -f
|
||||||
|
|
||||||
- name: Configure kubeconfig
|
- name: Configure kubeconfig
|
||||||
env:
|
env:
|
||||||
|
|||||||
+7
-7
@@ -7,24 +7,24 @@ ARG BUILD_REVISION=development
|
|||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
ca-certificates curl unzip libasound2t64 libfontconfig1 libgl1 libx11-6 \
|
ca-certificates curl libarchive-tools unzip libasound2t64 libfontconfig1 libgl1 libx11-6 \
|
||||||
libxcursor1 libxi6 libxinerama1 libxrandr2 \
|
libxcursor1 libxi6 libxinerama1 libxrandr2 \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt/godot
|
WORKDIR /opt/godot
|
||||||
RUN curl -fsSLO "https://github.com/godotengine/godot-builds/releases/download/${GODOT_RELEASE}/Godot_v${GODOT_RELEASE}_linux.x86_64.zip" \
|
RUN curl -fsSLO "https://github.com/godotengine/godot-builds/releases/download/${GODOT_RELEASE}/Godot_v${GODOT_RELEASE}_linux.x86_64.zip" \
|
||||||
&& curl -fsSLO "https://github.com/godotengine/godot-builds/releases/download/${GODOT_RELEASE}/Godot_v${GODOT_RELEASE}_export_templates.tpz" \
|
|
||||||
&& curl -fsSLO "https://github.com/godotengine/godot-builds/releases/download/${GODOT_RELEASE}/SHA512-SUMS.txt" \
|
&& curl -fsSLO "https://github.com/godotengine/godot-builds/releases/download/${GODOT_RELEASE}/SHA512-SUMS.txt" \
|
||||||
&& grep "Godot_v${GODOT_RELEASE}_linux.x86_64.zip\|Godot_v${GODOT_RELEASE}_export_templates.tpz" SHA512-SUMS.txt > selected-checksums.txt \
|
&& grep "Godot_v${GODOT_RELEASE}_linux.x86_64.zip" SHA512-SUMS.txt > selected-checksums.txt \
|
||||||
&& sha512sum --check selected-checksums.txt \
|
&& sha512sum --check selected-checksums.txt \
|
||||||
&& unzip -q "Godot_v${GODOT_RELEASE}_linux.x86_64.zip" \
|
&& unzip -q "Godot_v${GODOT_RELEASE}_linux.x86_64.zip" \
|
||||||
&& install -m 0755 "Godot_v${GODOT_RELEASE}_linux.x86_64" /usr/local/bin/godot \
|
&& install -m 0755 "Godot_v${GODOT_RELEASE}_linux.x86_64" /usr/local/bin/godot \
|
||||||
&& mkdir -p "/root/.local/share/godot/export_templates/${GODOT_TEMPLATE_DIR}" \
|
&& mkdir -p "/root/.local/share/godot/export_templates/${GODOT_TEMPLATE_DIR}" \
|
||||||
&& unzip -j -q "Godot_v${GODOT_RELEASE}_export_templates.tpz" \
|
&& curl -fsSL "https://github.com/godotengine/godot-builds/releases/download/${GODOT_RELEASE}/Godot_v${GODOT_RELEASE}_export_templates.tpz" \
|
||||||
templates/web_nothreads_debug.zip templates/web_nothreads_release.zip \
|
| bsdtar -xOf - templates/web_nothreads_release.zip \
|
||||||
-d "/root/.local/share/godot/export_templates/${GODOT_TEMPLATE_DIR}" \
|
> "/root/.local/share/godot/export_templates/${GODOT_TEMPLATE_DIR}/web_nothreads_release.zip" \
|
||||||
|
&& test -s "/root/.local/share/godot/export_templates/${GODOT_TEMPLATE_DIR}/web_nothreads_release.zip" \
|
||||||
&& unzip -tq "/root/.local/share/godot/export_templates/${GODOT_TEMPLATE_DIR}/web_nothreads_release.zip" \
|
&& unzip -tq "/root/.local/share/godot/export_templates/${GODOT_TEMPLATE_DIR}/web_nothreads_release.zip" \
|
||||||
&& rm -f Godot_v*.zip Godot_v*.tpz SHA512-SUMS.txt selected-checksums.txt
|
&& rm -f Godot_v*.zip Godot_v*_linux.x86_64 SHA512-SUMS.txt selected-checksums.txt
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
Reference in New Issue
Block a user