diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 76bfd2c..9e3a742 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -25,20 +25,29 @@ jobs: ssh-key: ${{ secrets.TEKTON_SSH_KEY }} ssh-strict: false - - name: Setup Godot + - name: Setup Godot from shared cache run: | - wget -nv http://192.168.0.114:9009/Godot_v4.6-stable_linux.x86_64.zip -O godot.zip \ - || wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip -O godot.zip + set -e + GODOT_SRC="/home/dev/godot-cache/Godot_v4.6-stable_linux.x86_64.zip" + if [ -f "$GODOT_SRC" ]; then + cp -a "$GODOT_SRC" ./godot.zip + else + wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip -O godot.zip + fi unzip -q godot.zip mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot chmod +x /usr/local/bin/godot - - name: Install export templates + - name: Install export templates from shared cache run: | set -euo pipefail mkdir -v -p ~/.local/share/godot/export_templates/4.6.stable - wget -nv http://192.168.0.114:9009/Godot_v4.6-stable_export_templates.tpz -O /tmp/godot-templates.tpz \ - || wget -nv https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz -O /tmp/godot-templates.tpz + TPL_SRC="/home/dev/godot-cache/Godot_v4.6-stable_export_templates.tpz" + if [ -f "$TPL_SRC" ]; then + cp -a "$TPL_SRC" /tmp/godot-templates.tpz + else + wget -nv https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz -O /tmp/godot-templates.tpz + fi unzip -o -q /tmp/godot-templates.tpz -d /tmp/godot-templates if [ -d /tmp/godot-templates/templates ]; then cp -a /tmp/godot-templates/templates/* ~/.local/share/godot/export_templates/4.6.stable/ 2>/dev/null || true @@ -74,20 +83,29 @@ jobs: ssh-key: ${{ secrets.TEKTON_SSH_KEY }} ssh-strict: false - - name: Setup Godot + - name: Setup Godot from shared cache run: | - wget -nv http://192.168.0.114:9009/Godot_v4.6-stable_linux.x86_64.zip -O godot.zip \ - || wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip -O godot.zip + set -e + GODOT_SRC="/home/dev/godot-cache/Godot_v4.6-stable_linux.x86_64.zip" + if [ -f "$GODOT_SRC" ]; then + cp -a "$GODOT_SRC" ./godot.zip + else + wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip -O godot.zip + fi unzip -q godot.zip mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot chmod +x /usr/local/bin/godot - - name: Install export templates + - name: Install export templates from shared cache run: | set -euo pipefail mkdir -v -p ~/.local/share/godot/export_templates/4.6.stable - wget -nv http://192.168.0.114:9009/Godot_v4.6-stable_export_templates.tpz -O /tmp/godot-templates.tpz \ - || wget -nv https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz -O /tmp/godot-templates.tpz + TPL_SRC="/home/dev/godot-cache/Godot_v4.6-stable_export_templates.tpz" + if [ -f "$TPL_SRC" ]; then + cp -a "$TPL_SRC" /tmp/godot-templates.tpz + else + wget -nv https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz -O /tmp/godot-templates.tpz + fi unzip -o -q /tmp/godot-templates.tpz -d /tmp/godot-templates if [ -d /tmp/godot-templates/templates ]; then cp -a /tmp/godot-templates/templates/* ~/.local/share/godot/export_templates/4.6.stable/ 2>/dev/null || true