forked from Conjure-Tools/unity-runner
65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
name: Individual Runners
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- versions.txt
|
|
- dockerfiles/runner.dockerfile
|
|
- .github/workflows/create-image.yaml
|
|
|
|
jobs:
|
|
build-docker:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GAMECI_OS: ubuntu
|
|
GAMECI_VERSION: 3
|
|
|
|
strategy:
|
|
max-parallel: 2
|
|
matrix:
|
|
platform:
|
|
- webgl
|
|
- android
|
|
- ios
|
|
- mac-mono
|
|
- windows-mono
|
|
- linux-il2cpp
|
|
|
|
name: Build 🐳 ${{ matrix.platform }}
|
|
environment:
|
|
name: Docker Hub
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Get Unity Version
|
|
id: unity-version
|
|
run: |
|
|
VERSION=$(head -n 1 versions.txt)
|
|
echo "UNITY_VERSION=$VERSION" >> $GITHUB_ENV
|
|
echo "Unity Version: $VERSION"
|
|
|
|
- name: Docker Build
|
|
run: .gitea/workflows/scripts/build-runner-image.sh
|
|
id: build-image
|
|
env:
|
|
UNITY_VERSION: ${{ env.UNITY_VERSION }}
|
|
UNITY_MODULES: ${{ matrix.platform }}
|
|
GAMECI_VERSION: ${{ env.GAMECI_VERSION }}
|
|
GAMECI_OS: ${{ env.GAMECI_OS }}
|
|
IMAGE: "${{ vars.DOCKERHUB_USERNAME }}/unity-runner"
|
|
TAG: ${{ env.GAMECI_OS }}-${{ env.UNITY_VERSION }}-${{ matrix.platform }}-runner
|
|
|
|
- name: Docker Push
|
|
run: |
|
|
echo "Pushing Docker Image ${{ steps.build-image.outputs.FULL_IMAGE }}"
|
|
echo "- Image: ${{ steps.build-image.outputs.IMAGE }}"
|
|
echo "- Tag: ${{ steps.build-image.outputs.TAG }}"
|
|
docker push ${{ steps.build-image.outputs.FULL_IMAGE }} |