forked from s3lph/matemat
GitLab CI: Build an image tagged latest-stable for master.
This commit is contained in:
parent
1dd1640cbe
commit
f8871a73e2
1 changed files with 3 additions and 2 deletions
|
@ -24,12 +24,13 @@ build:
|
|||
stage: build
|
||||
script:
|
||||
- docker build -t "registry.gitlab.com/s3lph/matemat:$(git rev-parse HEAD)" .
|
||||
- docker tag "registry.gitlab.com/s3lph/matemat:$(git rev-parse HEAD)" registry.gitlab.com/s3lph/matemat:latest-staging
|
||||
- docker tag "registry.gitlab.com/s3lph/matemat:$(git rev-parse HEAD)" "registry.gitlab.com/s3lph/matemat:latest-$([[ $(git symbolic-ref --short HEAD) == "master" ]] && echo stable || staging)"
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_TOKEN registry.gitlab.com
|
||||
- docker push "registry.gitlab.com/s3lph/matemat:$(git rev-parse HEAD)"
|
||||
- docker push registry.gitlab.com/s3lph/matemat:latest-staging
|
||||
- docker push registry.gitlab.com/s3lph/matemat:latest-$([[ $(git symbolic-ref --short HEAD) == "master" ]] && echo stable || staging)
|
||||
only:
|
||||
- staging
|
||||
- master
|
||||
|
||||
staging:
|
||||
stage: staging
|
||||
|
|
Loading…
Reference in a new issue