From 612927e2fe861b88d896a49762a367fd4a9e2b58 Mon Sep 17 00:00:00 2001 From: Tomer Keren Date: Sat, 4 Apr 2020 15:16:27 +0300 Subject: [PATCH 1/2] Move existing templates instead of redownloading (#8) Closes #8 --- entrypoint.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index e682841..13e8832 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,14 +1,8 @@ #!/bin/sh set -e -# Install export templates -wget https://downloads.tuxfamily.org/godotengine/3.2.1/Godot_v3.2.1-stable_export_templates.tpz --quiet -mkdir ~/.cache -mkdir -p ~/.config/godot -mkdir -p ~/.local/share/godot/templates/3.2.1.stable -unzip Godot_v3.2.1-stable_export_templates.tpz -mv templates/* ~/.local/share/godot/templates/3.2.1.stable -rm -f Godot_v3.2.1-stable_export_templates.tpz +# Move godot templates already installed from the docker image to home +mv /root/.local ~ if [ "$3" != "" ] then From 23fb03f5c6b143c1d573060b4b307660bed35bdc Mon Sep 17 00:00:00 2001 From: Tomer Keren Date: Sat, 4 Apr 2020 15:34:13 +0300 Subject: [PATCH 2/2] Make action not fail if dirs exist --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 13e8832..9fb7045 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,7 +2,7 @@ set -e # Move godot templates already installed from the docker image to home -mv /root/.local ~ +mv -n /root/.local ~ if [ "$3" != "" ] then @@ -27,7 +27,7 @@ echo ::set-output name=build::~/build/${SubDirectoryLocation:-""} if [ "$4" = "true" ] then - mkdir ~/package + mkdir -p ~/package cd ~/build zip ~/package/artifact.zip ${SubDirectoryLocation:-"."} -r echo ::set-output name=artifact::~/package/artifact.zip