Skip to content

Commit 3536ce1

Browse files
committed
drone/docker: Use a more standard format (go-gitea#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 6fe9f07 commit 3536ce1

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
@@ -568,6 +568,15 @@ workspace:
568568
base: /go
569569
path: src/code.gitea.io/gitea
570570

571+
depends_on:
572+
- testing
573+
574+
trigger:
575+
ref:
576+
- refs/heads/master
577+
- "refs/tags/**"
578+
- "refs/pull/**"
579+
571580
steps:
572581
- name: fetch-tags
573582
pull: default
@@ -581,56 +590,28 @@ steps:
581590

582591
- name: dryrun
583592
pull: always
584-
image: plugins/docker:18.09
593+
image: plugins/docker:linux-amd64
585594
settings:
586-
cache_from: gitea/gitea
587595
dry_run: true
588596
repo: gitea/gitea
589597
when:
590598
event:
591599
- pull_request
592600

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

635616
---
636617
kind: pipeline

0 commit comments

Comments
 (0)