From a5d7824d5b90d0424e1035a7a6fc5ac606e80aa7 Mon Sep 17 00:00:00 2001 From: EthanPisani Date: Tue, 18 Feb 2025 20:58:26 -0500 Subject: [PATCH] check entrypoint.sh --- .gitea/workflows/build.yml | 50 +++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 880ca2c9..ae1fe1db 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -10,43 +10,59 @@ jobs: fail-fast: false matrix: targetPlatform: - - StandaloneWindows64 # Build a Windows 64-bit standalone. - - StandaloneLinux64 # Build a Linux 64-bit standalone. + - StandaloneWindows64 # Windows 64-bit standalone + - StandaloneLinux64 # Linux 64-bit standalone unityVersion: - - 6000.0.37f1 + - 6000.0.37f1 # Stable Unity LTS version (update if needed) + steps: - - name: Update APT and Install Curl + - name: Update APT and Install Dependencies run: | - apt-get update - apt-get install -y curl git-lfs - git lfs install + sudo apt-get update + sudo apt-get install -y curl git-lfs + git lfs install - - name: Manually Install Node.js and Dependencies + - name: Install Node.js run: | - curl -fsSL https://deb.nodesource.com/setup_20.x | bash - - apt-get install -y nodejs - node -v + curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash - + sudo apt-get install -y nodejs + node -v - - uses: actions/checkout@v4 + - name: Checkout Repository + uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true - - uses: actions/cache@v3 + + - name: Cache Unity Library (Speeds up builds) + uses: actions/cache@v3 with: path: Library key: Library-${{ matrix.targetPlatform }} restore-keys: Library- - - uses: https://gitea.zuzu.red/EthanPisani/unity-builder@v4 + + - name: Ensure Entrypoint Exists & is Executable + run: | + if [ -f "/entrypoint.sh" ]; then + echo "Entrypoint found!" + chmod +x /entrypoint.sh + else + echo "Entrypoint script missing! Build may fail." + fi + + - name: Build with Unity + uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - RUN_AS_HOST_USER: true with: targetPlatform: ${{ matrix.targetPlatform }} unityVersion: ${{ matrix.unityVersion }} - runAsHostUser: true - - uses: actions/upload-artifact@v3 + runAsHostUser: false # Fixes self-hosted permission issues + + - name: Upload Build Artifacts + uses: actions/upload-artifact@v3 with: name: Build-${{ matrix.targetPlatform }} path: build/${{ matrix.targetPlatform }}