mirror of
https://github.com/minetest/minetest.git
synced 2024-12-27 00:17:29 +01:00
16 lines
345 B
Bash
16 lines
345 B
Bash
|
#!/bin/sh -e
|
||
|
name=${CONTAINER_IMAGE}/server
|
||
|
|
||
|
# build and publish Docker image (gitlab-ci)
|
||
|
|
||
|
docker build . \
|
||
|
-t ${name}:${CI_COMMIT_SHA} \
|
||
|
-t ${name}:${CI_COMMIT_REF_NAME} \
|
||
|
-t ${name}:latest
|
||
|
|
||
|
docker push ${name}:${CI_COMMIT_SHA}
|
||
|
docker push ${name}:${CI_COMMIT_REF_NAME}
|
||
|
[ "$CI_COMMIT_BRANCH" = master ] && docker push ${name}:latest
|
||
|
|
||
|
exit 0
|