53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: unity-command
|
|
description: "Run a Unity command using a specified version of Unity."
|
|
inputs:
|
|
platform:
|
|
description: "Unity Platform. Options: windows, windows32bit, mac, linux, android"
|
|
required: true
|
|
version:
|
|
description: "Unity Version."
|
|
required: true
|
|
imageTag:
|
|
description: "Tag to use for the temporary version of Unity. Must refer to an existing public Docker image. Must be the same is in the Dockerfile of the called action."
|
|
required: true
|
|
default: unityci/base:latest
|
|
serial:
|
|
description: "Unity license serial number. Or 'public' for a public license."
|
|
required: true
|
|
default: public
|
|
email:
|
|
description: "Unity email."
|
|
required: true
|
|
password:
|
|
description: "Unity password."
|
|
required: true
|
|
command:
|
|
description: "Unity command to run."
|
|
required: false
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: "Get Unity container name."
|
|
id: getContainer
|
|
uses: act/unity/unity-get-container@master
|
|
with:
|
|
version: ${{ inputs.version }}
|
|
platform: ${{ inputs.platform }}
|
|
- name: "Pull Unity container."
|
|
run: |
|
|
CONTAINER=${{ steps.getContainer.outputs.container }}
|
|
|
|
docker build -t ${{ inputs.imageTag }} --build-arg IMAGE=$CONTAINER ${{ github.action_path }}
|
|
shell: bash
|
|
- name: "Run Unity command."
|
|
uses: act/unity/unity@master
|
|
with:
|
|
serial: ${{ inputs.serial }}
|
|
email: ${{ inputs.email }}
|
|
password: ${{ inputs.password }}
|
|
command: ${{ inputs.command }}
|
|
- name: "Remove temporary image."
|
|
run: |
|
|
docker image rm ${{ inputs.imageTag }}
|
|
shell: bash
|