-
Notifications
You must be signed in to change notification settings - Fork 17
72 lines (65 loc) · 1.92 KB
/
Copy pathbuild-game-ci-image.yml
File metadata and controls
72 lines (65 loc) · 1.92 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
name: Build GameCI Image
on:
push:
branches:
- dev-game-ci-docker-image
workflow_dispatch:
inputs:
editor_version:
description: 'Unity Editor Version'
required: true
default: '6000.2.14f1'
change_set:
description: 'Unity Editor Changeset'
required: true
default: '589824c1fc31'
base_os:
description: 'Base OS'
required: true
default: 'ubuntu'
type: choice
options:
- ubuntu
- windows
- mac
target_platform:
description: 'Target Platform'
required: true
default: 'linux-il2cpp'
type: choice
options:
- linux-il2cpp
- windows-il2cpp
- mac-il2cpp
- android
- ios
- webgl
image_suffix:
description: 'Image Tag Suffix'
required: true
default: '3.2.0'
jobs:
build:
runs-on: Ubuntu-Big
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clone game-ci/docker
run: git clone https://github.com/game-ci/docker.git
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
working-directory: docker
run: |
IMAGE_NAME="ghcr.io/decentraland/unityci-editor:${{ inputs.base_os }}-${{ inputs.editor_version }}-${{ inputs.target_platform }}-${{ inputs.image_suffix }}"
docker build . \
--file ./images/${{ inputs.base_os }}/editor/Dockerfile \
-t $IMAGE_NAME \
--build-arg version=${{ inputs.editor_version }} \
--build-arg changeSet=${{ inputs.change_set }} \
--build-arg module=${{ inputs.target_platform }}
docker push $IMAGE_NAME