Skip to content

Commit acf6bd4

Browse files
sapktechknowlogick
authored andcommitted
drone/docker: Use a more standard format (#7480)
* drone/docker: Use a more standard format Based on the plugin drone structure itself : https://github.com/drone-plugins/drone-docker/blob/ebce953fc443371d79b5a019fcc9c1976f60a09a/.drone.yml#L9 Use autotag : http://plugins.drone.io/drone-plugins/drone-docker/#autotag * use latest plugins/docker:linux-amd64 * remove useless cache_from * Don't depends on translations step
1 parent aaf8c9f commit acf6bd4

File tree

1 file changed

+17
-36
lines changed

1 file changed

+17
-36
lines changed

.drone.yml

Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,15 @@ workspace:
570570
base: /go
571571
path: src/code.gitea.io/gitea
572572

573+
depends_on:
574+
- testing
575+
576+
trigger:
577+
ref:
578+
- refs/heads/master
579+
- "refs/tags/**"
580+
- "refs/pull/**"
581+
573582
steps:
574583
- name: fetch-tags
575584
pull: default
@@ -583,56 +592,28 @@ steps:
583592

584593
- name: dryrun
585594
pull: always
586-
image: plugins/docker:18.09
595+
image: plugins/docker:linux-amd64
587596
settings:
588-
cache_from: gitea/gitea
589597
dry_run: true
590598
repo: gitea/gitea
591599
when:
592600
event:
593601
- pull_request
594602

595-
- name: release
603+
- name: publish
596604
pull: always
597-
image: plugins/docker:18.09
605+
image: plugins/docker:linux-amd64
598606
settings:
599-
cache_from: gitea/gitea
607+
auto_tag: true
600608
repo: gitea/gitea
601-
tags:
602-
- "${DRONE_BRANCH##release/v}"
603-
environment:
604-
DOCKER_PASSWORD:
609+
password:
605610
from_secret: docker_password
606-
DOCKER_USERNAME:
611+
username:
607612
from_secret: docker_username
608-
depends_on:
609-
- dryrun
610613
when:
611-
branch:
612-
- "release/*"
613614
event:
614-
- push
615-
616-
- name: latest
617-
pull: always
618-
image: plugins/docker:18.09
619-
settings:
620-
cache_from: gitea/gitea
621-
default_tags: true
622-
repo: gitea/gitea
623-
environment:
624-
DOCKER_PASSWORD:
625-
from_secret: docker_password
626-
DOCKER_USERNAME:
627-
from_secret: docker_username
628-
depends_on:
629-
- dryrun
630-
when:
631-
branch:
632-
- master
633-
event:
634-
- push
635-
- tag
615+
exclude:
616+
- pull_request
636617

637618
---
638619
kind: pipeline

0 commit comments

Comments
 (0)