unity-runner/.github/workflows/create-image.yaml
2025-09-19 15:09:36 +10:00

59 lines
1.5 KiB
YAML

name: Individual Runners
on:
workflow_dispatch:
push:
branches: [main]
paths:
- versions.txt
- Dockerfile
- .github/workflows/create-image.yaml
jobs:
build-docker:
runs-on: ubuntu-latest
strategy:
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-individual-image.sh
id: build-image
env:
UNITY_VERSION: ${{ env.UNITY_VERSION }}
UNITY_PLATFORM: ${{ matrix.platform }}
IMAGE: "${{ vars.DOCKERHUB_USERNAME }}/unity-runner"
GAMECI_VERSION: ${{ env.GAMECI_VERSION }}
- 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 }}