Updated with UnityBuilder and cache.
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
ARG IMAGE=unityci/base:latest
|
||||
FROM ${IMAGE}
|
||||
|
||||
RUN apt update
|
||||
RUN apt install -y wget chromium-browser
|
||||
|
||||
COPY entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
COPY install-dotnet.sh /
|
||||
RUN bash /install-dotnet.sh
|
||||
|
||||
ADD https://minio.studiowhy.net/hackmd/UnityBuilder /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/UnityBuilder
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ inputs:
|
||||
command:
|
||||
description: "Unity command to run."
|
||||
required: false
|
||||
unityBuilder:
|
||||
description: "Whether or not to use the UnityBuilder instead of a Unity command."
|
||||
required: false
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -46,6 +49,7 @@ runs:
|
||||
email: ${{ inputs.email }}
|
||||
password: ${{ inputs.password }}
|
||||
command: ${{ inputs.command }}
|
||||
unityBuilder: ${{ inputs.unityBuilder }}
|
||||
- name: "Remove temporary image."
|
||||
run: |
|
||||
docker image rm ${{ inputs.imageTag }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
SERIAL=$1; EMAIL=$2; PASSWORD=$3; COMMAND=$4
|
||||
SERIAL=$1; EMAIL=$2; PASSWORD=$3; COMMAND=$4; UNITY_BUILDER=$4
|
||||
DEFAULT_ARGS="-quit -logFile -"
|
||||
|
||||
rm -rf $HOME/.config/unity3d
|
||||
@@ -32,5 +32,9 @@ else
|
||||
fi
|
||||
|
||||
#Run the command.
|
||||
if [[ -n "$UNITY_BUILDER" ]]; then
|
||||
UnityBuilder $COMMAND
|
||||
else
|
||||
unity-editor $DEFAULT_ARGS $COMMAND
|
||||
fi
|
||||
ls -Al Library
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
apt update
|
||||
apt install wget -y
|
||||
|
||||
#wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
#dpkg -i packages-microsoft-prod.deb
|
||||
#rm packages-microsoft-prod.deb
|
||||
#
|
||||
#apt update
|
||||
#apt install -y dotnet-sdk-6.0
|
||||
|
||||
#For UnityBuilder
|
||||
apt install -y chromium-browser
|
||||
@@ -21,6 +21,12 @@ inputs:
|
||||
command:
|
||||
description: "Unity command to run."
|
||||
required: false
|
||||
unityBuilder:
|
||||
description: "Whether or not to use the UnityBuilder instead of a Unity command."
|
||||
required: false
|
||||
cacheVolume:
|
||||
description: "Name of the volume to cache the Library folder to."
|
||||
required: false
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -34,10 +40,11 @@ runs:
|
||||
uses: act/unity/unity-get-buildtarget@master
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
- name: "Library"
|
||||
- name: "Restore the cached Library folder."
|
||||
if: ${{ inputs.cacheVolume }}
|
||||
uses: act/common/docker/docker-cp@master
|
||||
with:
|
||||
volume: library
|
||||
volume: ${{ inputs.cacheVolume }}
|
||||
toPath: .
|
||||
- name: "Run Unity command."
|
||||
uses: act/unity/unity-command@master
|
||||
@@ -48,8 +55,10 @@ runs:
|
||||
email: ${{ inputs.email }}
|
||||
password: ${{ inputs.password }}
|
||||
command: -projectPath ${{ inputs.projectPath }} -buildTarget ${{ steps.getTarget.outputs.buildTarget }} ${{ inputs.command }}
|
||||
- uses: act/common/docker/docker-cp@master
|
||||
- name: "Cache the Library folder."
|
||||
if: ${{ inputs.cacheVolume }}
|
||||
uses: act/common/docker/docker-cp@master
|
||||
with:
|
||||
#recreateVolume: true
|
||||
volume: library
|
||||
recreateVolume: true
|
||||
volume: ${{ inputs.cacheVolume }}
|
||||
fromPath: Library
|
||||
|
||||
Reference in New Issue
Block a user