Commit 42e0c141 authored by Jan Grewe's avatar Jan Grewe

build image with hash tag, then retag and push

parent 845819b6
Pipeline #584 passed with stages
in 41 seconds
......@@ -6,13 +6,14 @@ stages:
build:
stage: build
script:
- docker build -t registry.faked.org/gitlab-ci/android:latest .
- docker build -t registry.faked.org/gitlab-ci/android:${CI_COMMIT_SHORT_SHA} .
push_latest:
stage: push
only:
- master
script:
- docker tag registry.faked.org/gitlab-ci/android:${CI_COMMIT_SHORT_SHA} registry.faked.org/gitlab-ci/android:latest
- docker push registry.faked.org/gitlab-ci/android:latest
push_tag:
......@@ -20,4 +21,5 @@ push_tag:
only:
- tags
script:
- docker tag registry.faked.org/gitlab-ci/android:${CI_COMMIT_SHORT_SHA} registry.faked.org/gitlab-ci/android:${CI_COMMIT_TAG}
- docker push registry.faked.org/gitlab-ci/android:${CI_COMMIT_TAG}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment