gitea-release/.drone.yml

110 lines
2.0 KiB
YAML
Raw Normal View History

2020-05-31 17:45:35 +00:00
kind: pipeline
2020-05-31 20:34:05 +00:00
name: tests/release
2020-05-31 17:45:35 +00:00
steps:
- name: rust tests
image: "rust:1"
pull: always
commands:
2020-07-08 22:26:23 +00:00
- cargo test --all
environment:
GITEA_SERVER: https://tulpa.dev
DOMO_GITEA_TOKEN:
from_secret: DOMO_GITEA_TOKEN
2020-05-31 20:34:05 +00:00
when:
event:
- push
2020-05-31 19:47:57 +00:00
- name: auto-release
image: xena/gitea-release
pull: always
2020-05-31 19:47:57 +00:00
settings:
auth_username: cadey
gitea_server: https://tulpa.dev
gitea_token:
from_secret: GITEA_TOKEN
when:
2020-05-31 19:56:04 +00:00
event:
- push
2020-05-31 19:47:57 +00:00
branch:
2020-06-15 16:53:59 +00:00
- main
2020-05-31 20:34:05 +00:00
---
2020-07-08 23:16:09 +00:00
kind: pipeline
name: cargo publish
steps:
- name: publish elfs
image: rust:1
commands:
- cd elfs
- cargo login $CARGO_TOKEN
2020-07-08 23:25:22 +00:00
- "cargo publish ||:"
2020-07-08 23:16:09 +00:00
environment:
CARGO_TOKEN:
from_secret: CARGO_TOKEN
when:
event:
- tag
- name: publish gitea
image: rust:1
commands:
- cd gitea
- cargo login $CARGO_TOKEN
2020-07-08 23:25:22 +00:00
- "cargo publish ||:"
2020-07-08 23:16:09 +00:00
environment:
CARGO_TOKEN:
from_secret: CARGO_TOKEN
when:
event:
- tag
---
2020-05-31 20:34:05 +00:00
kind: pipeline
name: docker
steps:
- name: build docker image
image: "monacoremo/nix:2020-04-05-05f09348-circleci"
environment:
USER: root
commands:
2020-07-08 23:25:22 +00:00
- true # cachix use xe
2020-05-31 20:34:05 +00:00
- nix-build docker.nix
- cp $(readlink result) /result/docker.tgz
volumes:
- name: image
path: /result
when:
event:
- tag
- name: push docker image
image: docker:dind
volumes:
- name: image
path: /result
- name: dockersock
path: /var/run/docker.sock
commands:
2020-05-31 20:57:39 +00:00
- docker load -i /result/docker.tgz
2020-05-31 20:34:05 +00:00
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
- docker push xena/gitea-release
environment:
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
when:
event:
- tag
volumes:
- name: image
temp: {}
- name: dockersock
host:
path: /var/run/docker.sock