91d3042e77e585d38674a3d1d748b8fbe1273432
[platform/upstream/glib.git] / .gitlab-ci / run-docker.sh
1 #!/bin/bash
2
3 set -e
4
5 TAG="registry.gitlab.gnome.org/gnome/glib/master:v6"
6
7 docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
8     --file "Dockerfile" .
9
10 if [ "$1" = "--push" ]; then
11   docker login registry.gitlab.gnome.org
12   docker push $TAG
13 else
14   docker run --rm \
15       --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
16       --tty --interactive "${TAG}" bash
17 fi