-
Notifications
You must be signed in to change notification settings - Fork 1
96 lines (87 loc) · 2.43 KB
/
Copy pathcreate-runner.yaml
File metadata and controls
96 lines (87 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: 🏃♂️ Create Runners
on:
workflow_dispatch:
inputs:
unity_version:
description: 'Unity Version'
required: false
default: '6000.0.35f1'
type: string
platform:
description: 'Platform'
required: false
default: 'all'
type: choice
options:
- all
- webgl
- android
- ios
- mac-mono
- windows-mono
- linux-il2cpp
push:
branches: [main]
paths:
- versions.txt
- dockerfiles/runner.dockerfile
- .github/workflows/create-runner.yaml
jobs:
version:
runs-on: ubuntu-slim
name: 🧾 Check Unity Version
outputs:
UNITY_VERSION: ${{ steps.get-version.outputs.UNITY_VERSION }}
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: versions.txt
- name: Get Unity Version
id: get-version
run: |
VERSION="${{ github.event.inputs.unity_version }}"
if [ -z "$VERSION" ]; then
VERSION=$(head -n 1 versions.txt)
fi
echo "Unity Version: $VERSION"
echo "UNITY_VERSION=$VERSION" >> "$GITHUB_OUTPUT"
build:
runs-on: ubuntu-latest
needs: [ version ]
environment: "Docker Hub"
strategy:
matrix:
os:
- ubuntu
version:
- ${{ needs.version.outputs.UNITY_VERSION }}
platform:
- webgl
- android
- ios
- mac-mono
- windows-mono
- linux-il2cpp
name: ${{ matrix.version }} - ${{ matrix.platform }}
steps:
- uses: actions/checkout@v6
- name: "⚙️ Setup Buildx"
uses: docker/setup-buildx-action@v3
- name: "🔑 Login to Docker registry"
uses: docker/login-action@v4
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: "🐋 Build image"
uses: docker/build-push-action@v6
with:
context: .
file: dockerfiles/runner.dockerfile
build-args: |
UNITY_VERSION=${{ matrix.version }}
UNITY_PLATFORM=${{ matrix.platform }}
GAMECI_OS=${{ matrix.os }}
GAMECI_VERSION=3
GAMECI_IMAGE=unityci/editor
tags: lachee/unity-runner:${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform }}-runner
push: true