mirror of
https://github.com/game-ci/unity-actions.git
synced 2026-01-29 04:39:07 +08:00
Refactor request activation file action to follow good practices
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
# Get manual license file
|
||||
|
||||
Acquires manual license file for activating CI license.
|
||||
|
||||
## Usage
|
||||
|
||||
Unknown so far
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
|
||||
/opt/Unity/Editor/Unity \
|
||||
-batchmode \
|
||||
-nographics \
|
||||
-logFile /dev/stdout \
|
||||
-createManualActivationFile
|
||||
|
||||
echo "Use this file for manual activation and add it to \$UNITY_LICENSE variabe."
|
||||
cat Unity_v2019.2.11f1.alf
|
||||
|
||||
cp Unity_v2019.2.11f1.alf $HOME/Unity_v2019.2.11f1.alf
|
||||
@@ -1,7 +1,7 @@
|
||||
FROM gableroux/unity3d:2019.2.11f1
|
||||
|
||||
LABEL "com.github.actions.name"="Get Unity License File"
|
||||
LABEL "com.github.actions.description"="Acquire manual license file for Unity editor"
|
||||
LABEL "com.github.actions.name"="Request Unity Manual Activation File"
|
||||
LABEL "com.github.actions.description"="Request the manual activation file for activating Unity personal"
|
||||
LABEL "com.github.actions.icon"="box"
|
||||
LABEL "com.github.actions.color"="gray-dark"
|
||||
|
||||
8
request-manual-activation-file/README.md
Normal file
8
request-manual-activation-file/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Get manual license file
|
||||
|
||||
Acquires manual activation file for activating CI license.
|
||||
|
||||
## Usage
|
||||
|
||||
Please refer to `.github/actions/request.yml` in this repo while the repo is
|
||||
still a work in progress.
|
||||
8
request-manual-activation-file/action.yml
Normal file
8
request-manual-activation-file/action.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
name: 'Request manual activation file'
|
||||
description: 'Request the manual activation file for activating Unity personal'
|
||||
outputs:
|
||||
activationFile:
|
||||
description: 'Manual activation file'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
20
request-manual-activation-file/entrypoint.sh
Normal file
20
request-manual-activation-file/entrypoint.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Request the manual activation file for activating unity personal
|
||||
# Expected output file: "Unity_v${{ unity-tag }}.alf"
|
||||
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
|
||||
/opt/Unity/Editor/Unity \
|
||||
-batchmode \
|
||||
-nographics \
|
||||
-logFile /dev/stdout \
|
||||
-quit \
|
||||
-createManualActivationFile
|
||||
|
||||
# Output the resulting file as an output variable (Strategy 1)
|
||||
ACTIVATION_FILE=$(cat Unity_v2019.2.11f1.alf)
|
||||
echo "Use this file for manual activation and add it to \$UNITY_LICENSE variabe."
|
||||
echo "::add-mask::$ACTIVATION_FILE"
|
||||
echo "::set-output name=activationFile::$ACTIVATION_FILE"
|
||||
|
||||
# Output the resulting file by copying (Strategy 2)
|
||||
cp Unity_v2019.2.11f1.alf $HOME/Unity_v2019.2.11f1.alf
|
||||
Reference in New Issue
Block a user