ci: fix image tagging
This commit is contained in:
parent
158bddf60f
commit
5da1a68960
1 changed files with 5 additions and 41 deletions
46
.drone.yml
46
.drone.yml
|
@ -12,10 +12,6 @@ steps:
|
|||
|
||||
- name: publish:commit_sha
|
||||
image: plugins/docker
|
||||
# pull: never
|
||||
# volumes:
|
||||
# - name: cache
|
||||
# path: /stupid
|
||||
environment:
|
||||
DOCKER_REPO: glenux/service-drone-server
|
||||
settings:
|
||||
|
@ -23,46 +19,14 @@ steps:
|
|||
from_secret: DOCKERHUB_USERNAME
|
||||
password:
|
||||
from_secret: DOCKERHUB_PASSWORD
|
||||
cache_from: "glenux/service-drone-server:latest_${DRONE_BRANCH/\\//-}"
|
||||
cache_from: "glenux/service-drone-server:${DRONE_BRANCH/\\//-}_latest"
|
||||
repo: glenux/service-drone-server
|
||||
tags: "${DRONE_COMMIT_SHA:0:8}"
|
||||
tags:
|
||||
- "${DRONE_BRANCH/\\//-}_${DRONE_COMMIT_SHA:0:8}"
|
||||
- "${DRONE_BRANCH/\\//-}_latest"
|
||||
- "latest"
|
||||
purge: false
|
||||
|
||||
- name: publish:commit_branch
|
||||
image: plugins/docker
|
||||
# volumes:
|
||||
# - name: cache
|
||||
# path: /stupid
|
||||
settings:
|
||||
username:
|
||||
from_secret: DOCKERHUB_USERNAME
|
||||
password:
|
||||
from_secret: DOCKERHUB_PASSWORD
|
||||
cache_from: "glenux/service-drone-server:latest_${DRONE_BRANCH/\\//-}"
|
||||
repo: glenux/service-drone-server
|
||||
tags: "latest_${DRONE_BRANCH/\\//-}"
|
||||
purge: false
|
||||
when:
|
||||
branch:
|
||||
- "master"
|
||||
- "develop"
|
||||
- "feature/*"
|
||||
|
||||
- name: publish:latest
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: DOCKERHUB_USERNAME
|
||||
password:
|
||||
from_secret: DOCKERHUB_PASSWORD
|
||||
cache_from: "glenux/service-drone-server:latest_${DRONE_BRANCH/\\//-}"
|
||||
repo: glenux/service-drone-server
|
||||
tags: latest
|
||||
purge: false
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
||||
# - name: deploy:dokku
|
||||
# image: alpine
|
||||
# when:
|
||||
|
|
Loading…
Reference in a new issue