diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/create_release.yml | 56 | ||||
| -rw-r--r-- | .github/workflows/validate.yml | 45 |
2 files changed, 101 insertions, 0 deletions
diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 3345573c0..6d6a15bfc 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -127,6 +127,62 @@ jobs: name: zenserver-macos path: build/zenserver-macos.zip + docker-build: + name: Build Docker Images + runs-on: [linux, x64, zen] + timeout-minutes: 15 + needs: [bundle-linux, bundle-windows] + + steps: + - uses: actions/checkout@v4 + + - name: Read VERSION.txt + id: read_version + uses: ue-foundation/[email protected] + with: + path: "./VERSION.txt" + + - name: Download Linux bundle + uses: actions/download-artifact@v1 + with: + name: zenserver-linux + path: artifacts/linux + + - name: Download Windows bundle + uses: actions/download-artifact@v1 + with: + name: zenserver-win64 + path: artifacts/win64 + + - name: Extract binaries + run: | + mkdir -p build/linux/x86_64/release + unzip artifacts/linux/zenserver-linux.zip -d artifacts/linux-extracted + cp artifacts/linux-extracted/zenserver build/linux/x86_64/release/ + mkdir -p build/win-binary-staging + unzip artifacts/win64/zenserver-win64.zip -d artifacts/win-extracted + cp artifacts/win-extracted/zenserver.exe build/win-binary-staging/ + + - name: Build Docker image (with Wine + Windows binary) + run: | + docker build \ + -t zenserver-compute:${{ steps.read_version.outputs.content }} \ + --build-arg WIN_BINARY_DIR=build/win-binary-staging \ + -f docker/Dockerfile . + + - name: Build Docker image (Linux only, no Wine) + run: | + docker build \ + -t zenserver-compute-linux:${{ steps.read_version.outputs.content }} \ + --build-arg INSTALL_WINE=false \ + -f docker/Dockerfile . + + # TODO: Push images to container registry + # - name: Push images + # run: | + # docker push zenserver-compute:${{ steps.read_version.outputs.content }} + # docker push zenserver-compute-linux:${{ steps.read_version.outputs.content }} + create-release: runs-on: [linux, x64, zen] timeout-minutes: 5 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index d96645ac9..dfdb9677d 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -247,3 +247,48 @@ jobs: with: name: zenserver-macos path: build/zenserver-macos.zip + + docker-build: + name: Build Docker Images + if: github.ref_name == 'main' + runs-on: [linux, x64, zen] + timeout-minutes: 15 + needs: [linux-build, windows-build] + + steps: + - uses: actions/checkout@v4 + + - name: Download Linux bundle + uses: actions/download-artifact@v1 + with: + name: zenserver-linux + path: artifacts/linux + + - name: Download Windows bundle + uses: actions/download-artifact@v1 + with: + name: zenserver-win64 + path: artifacts/win64 + + - name: Extract binaries + run: | + mkdir -p build/linux/x86_64/release + unzip artifacts/linux/zenserver-linux.zip -d artifacts/linux-extracted + cp artifacts/linux-extracted/zenserver build/linux/x86_64/release/ + mkdir -p build/win-binary-staging + unzip artifacts/win64/zenserver-win64.zip -d artifacts/win-extracted + cp artifacts/win-extracted/zenserver.exe build/win-binary-staging/ + + - name: Build Docker image (with Wine + Windows binary) + run: | + docker build \ + -t zenserver-compute:latest \ + --build-arg WIN_BINARY_DIR=build/win-binary-staging \ + -f docker/Dockerfile . + + - name: Build Docker image (Linux only, no Wine) + run: | + docker build \ + -t zenserver-compute-linux:latest \ + --build-arg INSTALL_WINE=false \ + -f docker/Dockerfile . |