Updated actions to not use graphics by default.

This commit is contained in:
2023-08-05 20:18:18 -07:00
parent 043b94d9bb
commit 890af9b969
2 changed files with 18 additions and 1 deletions

View File

@@ -24,6 +24,10 @@ inputs:
command:
description: "Unity command to run."
required: false
useGraphics:
description: "Whether or not to use the user graphics device when running Unity."
required: false
default: "false"
unityBuilder:
description: "Whether or not to use the UnityBuilder instead of a Unity command."
required: false
@@ -54,6 +58,14 @@ runs:
docker tag $CACHED_CONTAINER ${{ inputs.imageTag }}
shell: bash
- name: "Get Unity Command"
id: command
run: |
COMMAND="${{ inputs.command }}"
if [[ "{{ inputs.useGraphics }}" != "true" ]]; then
COMMAND="$COMMAND -nographics"
fi
echo "command=$COMMAND"
- name: "Run Unity command."
uses: act/unity/unity@master
with:
@@ -61,7 +73,7 @@ runs:
# serial: "activated"
email: ${{ inputs.email }}
password: ${{ inputs.password }}
command: ${{ inputs.command }}
command: ${{ steps.command.outputs.command }}
unityBuilder: ${{ inputs.unityBuilder }}
- name: "Remove temporary image."
if: ${{ inputs.removeContainer == 'true' }}

View File

@@ -24,6 +24,10 @@ inputs:
unityBuilder:
description: "Whether or not to use the UnityBuilder instead of a Unity command."
required: false
useGraphics:
description: "Whether or not to use the user graphics device when running Unity."
required: false
default: "false"
cacheVolume:
description: "Name of the volume to cache the Library folder to."
required: false
@@ -60,6 +64,7 @@ runs:
password: ${{ inputs.password }}
command: -projectPath ${{ inputs.projectPath }} -buildTarget ${{ steps.getTarget.outputs.buildTarget }} ${{ inputs.command }}
removeContainer: ${{ inputs.removeContainer }}
useGraphics: ${{ inputs.useGraphics }}
- name: "Cache the Library folder."
if: inputs.cacheVolume != null
uses: act/common/docker/docker-cp@master