oapi-type-definitions-extra.../.drone.yml

38 lines
876 B
YAML
Raw Normal View History

2023-01-12 13:49:16 +00:00
---
kind: pipeline
type: docker
name: default
steps:
# Build docker image and push to docker hub
- name: build
image: golang:1.19-alpine
pull: if-not-exists
commands:
2023-01-12 14:15:40 +00:00
- go build -o cmd/app ./src/main.go
2023-01-12 13:49:16 +00:00
- name: "lint"
image: golangci/golangci-lint:v1.50
pull: if-not-exists
commands:
2023-01-12 14:35:06 +00:00
- cd src
2023-01-12 13:49:16 +00:00
- golangci-lint run
- name: "build and publish docker image"
image: plugins/docker
settings:
registry: gitea.linuxcode.net
2023-01-12 14:43:47 +00:00
repo: gitea.linuxcode.net/linuxcode/oapi-type-definitions-extractor
2023-01-12 13:49:16 +00:00
dockerfile: dockerfile
tags: latest
username:
from_secret: drone_docker_username
password:
2023-01-12 13:58:33 +00:00
from_secret: drone_docker_password
2023-01-12 14:01:58 +00:00
- name: "add binary release to gitea"
image: plugins/gitea-release
settings:
api_key: 5353c40cd692fd01f243b1f935af1962ff03bfd6
base_url: https://gitea.linuxcode.net
files: cmd/app