mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +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
|