forked from Conjure-Tools/unity-runner
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: Create Images
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'scripts/build-image.sh'
|
|
- 'Dockerfiles/*'
|
|
- .gitea/workflows/build-latest-image.yaml
|
|
- 'versions.txt'
|
|
|
|
jobs:
|
|
build-docker:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DOCKER_REGISTRY: docker.lakes.house/
|
|
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- webgl
|
|
- android
|
|
- mac-mono
|
|
- windows-mono
|
|
- linux-il2cpp
|
|
# - windows-il2cpp
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Login to Docker Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.DOCKER_REGISTRY }} # usual credentials for bastion.local
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Get Unity Version
|
|
run: |
|
|
VERSION=$(head -n 1 versions.txt)
|
|
echo "UNITY_VERSION=$VERSION" >> $GITHUB_ENV
|
|
echo "Unity Version: $VERSION"
|
|
|
|
- name: Docker Build
|
|
run: ./scripts/build-image.sh
|
|
id: build-image
|
|
env:
|
|
UNITY_VERSION: ${{ env.UNITY_VERSION }}
|
|
UNITY_PLATFORM: ${{ matrix.platform }}
|
|
IMAGE: ${{ env.DOCKER_REGISTRY }}unityci/editor
|
|
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 }} |