-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.26 KB
/
dispatch.yml
File metadata and controls
44 lines (36 loc) · 1.26 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
name: Unity Tests
on:
workflow_dispatch:
jobs:
# First job: mirror UnityCI image into GHCR
mirror-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write # needed to push to GHCR
steps:
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull UnityCI image from Docker Hub
run: docker pull unityci/editor:ubuntu-2021.3.42f1-android-3
- name: Tag image for GHCR
run: |
docker tag unityci/editor:ubuntu-2021.3.42f1-android-3 \
ghcr.io/${{ github.repository_owner }}/unityci-editor:ubuntu-2021.3.42f1-android-3
- name: Push to GHCR
run: docker push ghcr.io/${{ github.repository_owner }}/unityci-editor:ubuntu-2021.3.42f1-android-3
# Actual build job, depends on the mirror step
build:
runs-on: ubuntu-latest
needs: mirror-image
container:
image: ghcr.io/${{ github.repository_owner }}/unityci-editor:ubuntu-2021.3.42f1-android-3
options: --ipc=host
steps:
- uses: actions/checkout@v3
- name: Verify Unity version
run: unity-editor --version