From c16def4bed2362b20f93f44e61376205e68a18e1 Mon Sep 17 00:00:00 2001 From: Lachee Date: Wed, 7 May 2025 08:52:03 +1000 Subject: [PATCH] moved the docker stuff here --- .gitea/build-all.yaml | 48 ++++++++++++++++++++++++++++++ Dockerfiles/UnityEditor.Dockerfile | 27 +++++++++++++++++ images.yaml | 6 ++++ 3 files changed, 81 insertions(+) create mode 100644 .gitea/build-all.yaml create mode 100644 Dockerfiles/UnityEditor.Dockerfile create mode 100644 images.yaml diff --git a/.gitea/build-all.yaml b/.gitea/build-all.yaml new file mode 100644 index 0000000..c485df1 --- /dev/null +++ b/.gitea/build-all.yaml @@ -0,0 +1,48 @@ +name: Create Images + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + build-docker: + runs-on: ubuntu-latest + env: + GAMECI_VERSION: 3 + PLATFORM: linux/amd64 + DOCKER_REGISTRY: docker.lakes.house + + strategy: + matrix: + platform: + - webgl + - android + version: + - 6000.0.35f1 + steps: + - uses: actions/checkout@v4 + - name: Login to Docker Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.DOCKER_REGISTRY }} # usual credentials for bastion.local + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build Docker Image + run: | + BASE_IMAGE=unityci/editor:ubuntu-${UNITY_VERSION}-${UNITY_PLATFORM}-${GAME_CI_VERSION} + TAG=${{ env.DOCKER_REGISTRY }}/unityci/editor:ubuntu-${UNITY_VERSION}-${UNITY_PLATFORM}-runner + docker build \ + --platform ${PLATFORM} \ + --build-arg GAME_CI_UNITY_EDITOR_IMAGE=${BASE_IMAGE} \ + -t ${TAG} \ + Dockerfiles/UnityEditor.Dockerfile + + env: + UNITY_VERSION: ${{ matrix.version }} + UNITY_PLATFORM: ${{ matrix.platform }} + + + diff --git a/Dockerfiles/UnityEditor.Dockerfile b/Dockerfiles/UnityEditor.Dockerfile new file mode 100644 index 0000000..6453de1 --- /dev/null +++ b/Dockerfiles/UnityEditor.Dockerfile @@ -0,0 +1,27 @@ +ARG GAME_CI_UNITY_EDITOR_IMAGE=unityci/editor + +FROM $GAME_CI_UNITY_EDITOR_IMAGE + +# Setup Dependants +RUN apt-get update && \ + apt-get install -y \ + git \ + curl \ + gcc \ + make \ + libssl-dev \ + zlib1g-dev \ + libsqlite3-dev + +# Set up Node.js environment for github actions +RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ + apt-get install -y nodejs && \ + npm install -g npm@latest + +# Set up the scripts +RUN git clone --depth=1 https://github.com/game-ci/unity-builder.git /gameci && \ + cp -rf /gameci/dist/platforms/ubuntu/steps /steps && \ + cp -rf /gameci/dist/default-build-script /UnityBuilderAction && \ + cp /gameci/dist/platforms/ubuntu/entrypoint.sh /entrypoint.sh + +ENTRYPOINT [ "/entrypoint.sh" ] \ No newline at end of file diff --git a/images.yaml b/images.yaml new file mode 100644 index 0000000..8560a2a --- /dev/null +++ b/images.yaml @@ -0,0 +1,6 @@ +images: + versions: + - 6000.0.35f1 + modules: + - android + - webgl