Skip to content

Commit d372539

Browse files
sapktechknowlogick
authored andcommitted
Backport drone fix from #7480 and #7496 (#7504)
* don't make release-version deps on transalations since translations is only triggered by push on master (#7496) * 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 91e24a3 commit d372539

File tree

1 file changed

+17
-37
lines changed

1 file changed

+17
-37
lines changed

.drone.yml

Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@ trigger:
453453

454454
depends_on:
455455
- testing
456-
- translations
457456

458457
steps:
459458
- name: fetch-tags
@@ -569,6 +568,15 @@ workspace:
569568
base: /go
570569
path: src/code.gitea.io/gitea
571570

571+
depends_on:
572+
- testing
573+
574+
trigger:
575+
ref:
576+
- refs/heads/master
577+
- "refs/tags/**"
578+
- "refs/pull/**"
579+
572580
steps:
573581
- name: fetch-tags
574582
pull: default
@@ -582,56 +590,28 @@ steps:
582590

583591
- name: dryrun
584592
pull: always
585-
image: plugins/docker:18.09
593+
image: plugins/docker:linux-amd64
586594
settings:
587-
cache_from: gitea/gitea
588595
dry_run: true
589596
repo: gitea/gitea
590597
when:
591598
event:
592599
- pull_request
593600

594-
- name: release
595-
pull: always
596-
image: plugins/docker:18.09
597-
settings:
598-
cache_from: gitea/gitea
599-
repo: gitea/gitea
600-
tags:
601-
- "${DRONE_BRANCH##release/v}"
602-
environment:
603-
DOCKER_PASSWORD:
604-
from_secret: docker_password
605-
DOCKER_USERNAME:
606-
from_secret: docker_username
607-
depends_on:
608-
- dryrun
609-
when:
610-
branch:
611-
- "release/*"
612-
event:
613-
- push
614-
615-
- name: latest
601+
- name: publish
616602
pull: always
617-
image: plugins/docker:18.09
603+
image: plugins/docker:linux-amd64
618604
settings:
619-
cache_from: gitea/gitea
620-
default_tags: true
605+
auto_tag: true
621606
repo: gitea/gitea
622-
environment:
623-
DOCKER_PASSWORD:
607+
password:
624608
from_secret: docker_password
625-
DOCKER_USERNAME:
609+
username:
626610
from_secret: docker_username
627-
depends_on:
628-
- dryrun
629611
when:
630-
branch:
631-
- master
632612
event:
633-
- push
634-
- tag
613+
exclude:
614+
- pull_request
635615

636616
---
637617
kind: pipeline

0 commit comments

Comments
 (0)