Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drone/docker: Use a more standard format #7480

Merged
merged 5 commits into from
Jul 17, 2019
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 18 additions & 36 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,16 @@ workspace:
base: /go
path: src/code.gitea.io/gitea

depends_on:
- testing
- translations
sapk marked this conversation as resolved.
Show resolved Hide resolved

trigger:
ref:
- refs/heads/master
- "refs/tags/**"
- "refs/pull/**"

steps:
- name: fetch-tags
pull: default
Expand All @@ -584,56 +594,28 @@ steps:

- name: dryrun
pull: always
image: plugins/docker:18.09
image: plugins/docker:linux-amd64
settings:
cache_from: gitea/gitea
dry_run: true
repo: gitea/gitea
when:
event:
- pull_request

- name: release
pull: always
image: plugins/docker:18.09
settings:
cache_from: gitea/gitea
repo: gitea/gitea
tags:
- "${DRONE_BRANCH##release/v}"
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
depends_on:
- dryrun
when:
branch:
- "release/*"
event:
- push

- name: latest
- name: publish
pull: always
image: plugins/docker:18.09
image: plugins/docker:linux-amd64
settings:
cache_from: gitea/gitea
default_tags: true
auto_tag: true
repo: gitea/gitea
environment:
DOCKER_PASSWORD:
password:
from_secret: docker_password
DOCKER_USERNAME:
username:
from_secret: docker_username
depends_on:
- dryrun
when:
branch:
- master
event:
- push
- tag
exclude:
- pull_request

---
kind: pipeline
Expand Down