Added many, many more actions.
This commit is contained in:
23
unity/unity-get-container/action.yaml
Normal file
23
unity/unity-get-container/action.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
|
||||
bash ${{ github.action_path }}/get_container.sh "${{ inputs.platform }}" "${{ inputs.version }}"
|
||||
shell: bash
|
||||
37
unity/unity-get-container/get_container.sh
Normal file
37
unity/unity-get-container/get_container.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
# Choose the appropriate container from: https://hub.docker.com/r/unityci/editor
|
||||
UNITY_TARGET="$1"
|
||||
UNITY_VERSION="$2"
|
||||
|
||||
TARGET=$(echo "$UNITY_TARGET" | awk '{print tolower($0)}')
|
||||
BUILD_ARG=""
|
||||
case $TARGET in
|
||||
"windows" | "windows32bit")
|
||||
UNITY_TARGET=windows-mono-1
|
||||
;;
|
||||
"mac" | "osx")
|
||||
UNITY_TARGET=mac-mono-1
|
||||
;;
|
||||
"ios")
|
||||
UNITY_TARGET=ios-1
|
||||
UNITY_VERSION=ubuntu-$UNITY_VERSION
|
||||
;;
|
||||
"linux")
|
||||
UNITY_TARGET=base-1
|
||||
UNITY_VERSION=ubuntu-$UNITY_VERSION
|
||||
;;
|
||||
"android")
|
||||
UNITY_TARGET=android-1
|
||||
UNITY_VERSION=ubuntu-$UNITY_VERSION
|
||||
;;
|
||||
"webgl")
|
||||
UNITY_TARGET=webgl-1
|
||||
UNITY_VERSION=ubuntu-$UNITY_VERSION
|
||||
;;
|
||||
*)
|
||||
echo "Invalid target. Valid options are: Windows, Windows32bit, Mac, iOS, Linux, Android, WebGL"
|
||||
;;
|
||||
esac
|
||||
|
||||
CONTAINER=unityci/editor:$UNITY_VERSION-$UNITY_TARGET
|
||||
echo "container=$CONTAINER" >> "$GITHUB_OUTPUT"
|
||||
Reference in New Issue
Block a user