Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(github): Run Docker as the GitHub user to simplify code
The `all-tools` target of the Docker image contains a `/home/ort` directory that belongs to the Docker image's "ort" user (UID 1000), but it does not contain a `/home/ort/.gradle` directory yet. Ideally, one would like to simply mount `/home/runner/.gradle:/home/ort/.gradle` without any `chown` magic, but that does not work as the Docker image's user does not exist on the host and thus the directory is not accessible. Also just running the Docker image as the host user does not work, as the mount point's parent directory (`/home/ort`) belongs to the Docker image's "ort" user, so Gradle cannot create any sub-directories below `.gradle` as the host user. As a solution, simply mount to a non-existing home directory in the Docker image, and just choose that to be the same directory as on the host (`/home/runner`). As now `HOME` needs to be set, let Gradle deduce `GRADLE_USER_HOME` from it automatically. Signed-off-by: Sebastian Schuberth <[email protected]>
- Loading branch information