Skip to content

Commit ee199ad

Browse files
committed
Use service instead of container
1 parent cb62775 commit ee199ad

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ jobs:
290290
291291
unreal_engine_tests:
292292
name: Unreal Engine Tests
293+
# This can't go on e.g. ubuntu-latest because that runner runs out of disk space. ChatGPT suggested that the general solution tends to be to use
294+
# a custom runner.
295+
runs-on: spacetimedb-new-runner
293296
container:
294297
image: localhost:5000/spacetimedb-ci:latest
295298
options: >-
@@ -298,24 +301,21 @@ jobs:
298301
-v /var/run/docker.sock:/var/run/docker.sock
299302
-v /opt/github-runner/cargo-cache:/home/runner/.cargo/registry
300303
-v /opt/github-runner/cargo-git:/home/runner/.cargo/git
301-
302-
# This can't go on e.g. ubuntu-latest because that runner runs out of disk space. ChatGPT suggested that the general solution tends to be to use
303-
# a custom runner.
304-
runs-on: spacetimedb-new-runner
305304
# Skip if this is an external contribution. GitHub secrets will be empty, so the step would fail anyway.
306305
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }}
307-
container:
308-
image: ghcr.io/epicgames/unreal-engine:dev-5.6
309-
credentials:
310-
# Note(bfops): I don't think that `github.actor` needs to match the user that the token is for, because I'm using a token for my account and
311-
# it seems to be totally happy.
312-
# However, the token needs to be for a user that has access to the EpicGames org (see
313-
# https://dev.epicgames.com/documentation/en-us/unreal-engine/downloading-source-code-in-unreal-engine?application_version=5.6)
314-
username: ${{ github.actor }}
315-
password: ${{ secrets.GHCR_TOKEN }}
316-
# Run as root because otherwise we get permission denied for various directories inside the container. I tried doing dances to allow it to run
317-
# without this (reassigning env vars and stuff), but was unable to get it to work and it felt like an uphill battle.
318-
options: --user 0:0
306+
services:
307+
unreal:
308+
image: ghcr.io/epicgames/unreal-engine:dev-5.6
309+
credentials:
310+
# Note(bfops): I don't think that `github.actor` needs to match the user that the token is for, because I'm using a token for my account and
311+
# it seems to be totally happy.
312+
# However, the token needs to be for a user that has access to the EpicGames org (see
313+
# https://dev.epicgames.com/documentation/en-us/unreal-engine/downloading-source-code-in-unreal-engine?application_version=5.6)
314+
username: ${{ github.actor }}
315+
password: ${{ secrets.GHCR_TOKEN }}
316+
# Run as root because otherwise we get permission denied for various directories inside the container. I tried doing dances to allow it to run
317+
# without this (reassigning env vars and stuff), but was unable to get it to work and it felt like an uphill battle.
318+
options: --user 0:0
319319
steps:
320320
# Uncomment this before merging so that it will run properly if run manually through the GH actions flow. It was playing weird with rolled back
321321
# commits though.

0 commit comments

Comments
 (0)