From abdee8442596d14b4e9e8d2a24ad498f921c9884 Mon Sep 17 00:00:00 2001 From: Webber Date: Sat, 30 Nov 2019 15:16:43 +0100 Subject: [PATCH] Remove moved activation action files --- request-activation/Dockerfile | 14 ----- request-activation/README.md | 41 --------------- request-activation/action.yml | 5 -- request-activation/entrypoint.sh | 90 -------------------------------- 4 files changed, 150 deletions(-) delete mode 100644 request-activation/Dockerfile delete mode 100644 request-activation/README.md delete mode 100644 request-activation/action.yml delete mode 100644 request-activation/entrypoint.sh diff --git a/request-activation/Dockerfile b/request-activation/Dockerfile deleted file mode 100644 index 92e729e..0000000 --- a/request-activation/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM gableroux/unity3d:2019.2.11f1 - -LABEL "com.github.actions.name"="Activate Unity" -LABEL "com.github.actions.description"="Activate license for Unity editor" -LABEL "com.github.actions.icon"="box" -LABEL "com.github.actions.color"="gray-dark" - -LABEL "repository"="http://github.com/webbertakken/unity-actions" -LABEL "homepage"="http://github.com/webbertakken/unity-actions" -LABEL "maintainer"="Webber Takken " - -ADD entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] diff --git a/request-activation/README.md b/request-activation/README.md deleted file mode 100644 index 7fba2f3..0000000 --- a/request-activation/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Activate Unity - -Activates personal of professional license of unity. - -## Usage - -#### Personal license example - -1. Goto `Repository` > `Settings` > `Secrets` -2. Create a new secret called `UNITY_LICENSE` -3. Request manual activation file using the -[request action](../request-manual-activation-file/README.md) -and use it to acquire your license from -[unity licensing](https://license.unity3d.com/manual). -4. Copy the contents of the license file into the value field of the secret `UNITY_LICENSE` -5. Use the action as follows: - -```yaml -- name: Activate Unity - uses: webbertakken/unity-actions/request-activation@master - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} -``` - -#### Professional license example - -1. Goto `Repository` > `Settings` > `Secrets` -2. Set the following secrets: - - `UNITY_EMAIL`: <your_unity_login_email_address> - - `UNITY_PASSWORD`: <your_unity_login_password> - - `UNITY_SERIAL`: <your_unity_serial> -3. Use the action as follows: - -```yaml -- name: Activate Unity - uses: webbertakken/unity-actions/request-activation@master - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} -``` diff --git a/request-activation/action.yml b/request-activation/action.yml deleted file mode 100644 index 0b9dcb0..0000000 --- a/request-activation/action.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: 'Request activation' -description: 'Request activation using credentials or license file' -runs: - using: 'docker' - image: 'Dockerfile' diff --git a/request-activation/entrypoint.sh b/request-activation/entrypoint.sh deleted file mode 100644 index 2b16827..0000000 --- a/request-activation/entrypoint.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash - -if [[ -n "$UNITY_LICENSE" ]]; then - # - # PERSONAL LICENSE MODE - # - # This will activate Unity, using a license file - # - # Note that this is the ONLY WAY for PERSONAL LICENSES in 2019. - # * See for more details: https://gitlab.com/gableroux/unity3d-gitlab-ci-example/issues/5#note_72815478 - # - # The license file can be acquired in two possible ways: - # * Utilize `webbertakken/unity-actions/request-manual-activation-file` - # * Copy from your local machine (may be unstable due to different server specs) - # - Windows: C:/ProgramData/Unity/Unity_lic.ulf - # - MacOS: /Library/Application Support/Unity/Unity_lic.ulf - # - Linux: - - # - # CLI arguments reference: https://docs.unity3d.com/Manual/CommandLineArguments.html - - # Set the license file path - FILE_PATH=UnityLicenseFile.ulf - - # Copy license file from Github variables - echo "$UNITY_LICENSE" | tr -d '\r' > $FILE_PATH - echo "$UNITY_LICENSE" | tr -d '\r' > /root/.local/share/unity3d/Unity/Unity_lic.ulf - - ## - ## Activate license - ## - echo "Requesting activation" - xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \ - /opt/Unity/Editor/Unity \ - -batchmode \ - -nographics \ - -logFile /dev/stdout \ - -quit \ - -manualLicenseFile $FILE_PATH - # This is expected to always exit with code 1 (both success and failure). - # Convert to exit code 0 by echoing the current exit code. - echo $? - # Exit code is now 0 - - ## - ## Verify activated license - ## - echo "Verifying activation" - # Run any command that requires activation to verify - xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \ - /opt/Unity/Editor/Unity \ - -batchmode \ - -nographics \ - -logFile /dev/stdout \ - -quit - - # Store the exit code from the verify command - UNITY_EXIT_CODE=$? - - # Display information about the result - if [ $UNITY_EXIT_CODE -eq 0 ]; then - echo "Activation complete" - else - echo "Unclassified error occured while trying to activate license" - echo "Exit code was: $UNITY_EXIT_CODE" - fi - - # Exit with the code from the license verification step - exit $UNITY_EXIT_CODE - -else - # - # PROFESSIONAL (SERIAL) LICENSE MODE - # - # This will activate unity, using the activating process. - # - # Note: This is the preferred way for PROFESSIONAL LICENSES. - # - # TODO - Verify this using some pro license - # - xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \ - /opt/Unity/Editor/Unity \ - -batchmode \ - -nographics \ - -logFile /dev/stdout \ - -quit \ - -serial "$UNITY_SERIAL" \ - -username "$UNITY_EMAIL" \ - -password "$UNITY_PASSWORD" - -fi