glib/.gitlab-ci/run-docker.sh
Xavier Claessens 21da53a7f6 ci: Use a docker image for stable branch
The master docker image will eventually use a new meson version, but we
want to ensure stable branch still works on old version.
2018-09-24 10:05:15 -04:00

18 lines
390 B
Bash
Executable File

#!/bin/bash
set -e
TAG="registry.gitlab.gnome.org/gnome/glib/2-58:v1"
docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
--file "Dockerfile" .
if [ "$1" = "--push" ]; then
docker login registry.gitlab.gnome.org
docker push $TAG
else
docker run --rm \
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
--tty --interactive "${TAG}" bash
fi