Initial Commit.
This commit is contained in:
38
unity-get-container/action.yaml
Normal file
38
unity-get-container/action.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
name: unity-get-container
|
||||
description: "Get the correct Unity docker container from a provided platform."
|
||||
inputs:
|
||||
version:
|
||||
description: "Unity Version."
|
||||
required: true
|
||||
platform:
|
||||
description: "Unity Platform. Options: windows, windows32bit, mac, linux, android"
|
||||
required: true
|
||||
outputs:
|
||||
container:
|
||||
description: "Unity Docker Container"
|
||||
value: ${{ steps.getContainer.outputs.container }}
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: "Get Unity Docker Container."
|
||||
id: getContainer
|
||||
run: |
|
||||
#Choose the appropriate container from: https://hub.docker.com/r/unityci/editor
|
||||
UNITY_VERSION=${{ inputs.version }}
|
||||
UNITY_PLATFORM=${{ inputs.platform }}
|
||||
|
||||
if [[ $UNITY_PLATFORM == "windows" || $UNITY_PLATFORM == "windows32bit" ]]; then
|
||||
UNITY_PLATFORM=windows-mono-1.0.1
|
||||
elif [[ $UNITY_PLATFORM == "mac" ]]; then
|
||||
UNITY_PLATFORM=mac-mono-1.0.1
|
||||
elif [[ $UNITY_PLATFORM == "linux" ]]; then
|
||||
UNITY_PLATFORM=base-1.0.1
|
||||
UNITY_VERSION=ubuntu-$UNITY_VERSION
|
||||
elif [[ $UNITY_PLATFORM == "android" ]]; then
|
||||
UNITY_PLATFORM=$UNITY_PLATFORM-1.0.1
|
||||
fi
|
||||
|
||||
CONTAINER=unityci/editor:$UNITY_VERSION-$UNITY_PLATFORM
|
||||
|
||||
echo "::set-output name=container::$CONTAINER"
|
||||
shell: bash
|
||||
Reference in New Issue
Block a user