Add LICENSE, update README.md, .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
63
.drone.yml
63
.drone.yml
@@ -5,11 +5,13 @@ name: default
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
- dev
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
steps:
|
||||
# Общие шаги для всех веток
|
||||
- name: deps
|
||||
image: golang:1.24-alpine
|
||||
commands:
|
||||
@@ -19,23 +21,54 @@ steps:
|
||||
image: golangci/golangci-lint:v1.64-alpine
|
||||
commands:
|
||||
- golangci-lint run --timeout=5m --verbose ./...
|
||||
|
||||
- name: test
|
||||
image: golang:1.24-alpine
|
||||
commands:
|
||||
- apk add --no-cache build-base
|
||||
- CGO_ENABLED=1 go test -race -cover ./...
|
||||
# Шаг сборки и публикации будет добавлен позже
|
||||
# - name: build-and-publish
|
||||
# image: plugins/docker
|
||||
# settings:
|
||||
# repo: gitea.mrixs.me/mrixs/yamusic-bot
|
||||
# registry: gitea.mrixs.me
|
||||
# username:
|
||||
# from_secret: gitea_username
|
||||
# password:
|
||||
# from_secret: gitea_password
|
||||
# auto_tag: true
|
||||
# platforms:
|
||||
# - linux/amd64
|
||||
# - linux/arm64
|
||||
|
||||
# Шаг сборки и публикации для MASTER
|
||||
- name: build-and-publish-master
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: gitea.mrixs.me/mrixs/yamusic-bot
|
||||
registry: gitea.mrixs.me
|
||||
username:
|
||||
from_secret: gitea_username
|
||||
password:
|
||||
from_secret: gitea_password
|
||||
auto_tag: true # Создаст теги: latest, git-хеш и т.д.
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- linux/arm/v7
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
|
||||
# Шаг сборки и публикации для DEV (nightbuild/dev-build)
|
||||
- name: build-and-publish-dev
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: gitea.mrixs.me/mrixs/yamusic-bot
|
||||
registry: gitea.mrixs.me
|
||||
username:
|
||||
from_secret: gitea_username
|
||||
password:
|
||||
from_secret: gitea_password
|
||||
# Вместо auto_tag: true указываем теги вручную
|
||||
tags:
|
||||
- dev # Статический тег 'dev', который будет перезаписываться
|
||||
# Очень полезный тег: dev-<короткий-хеш-коммита>
|
||||
- dev-${DRONE_COMMIT_SHA:0:7}
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- linux/arm/v7
|
||||
when:
|
||||
branch:
|
||||
- dev
|
||||
event:
|
||||
- push
|
||||
|
||||
Reference in New Issue
Block a user