115 lines
1.8 KiB
YAML
115 lines
1.8 KiB
YAML
|
---
|
||
|
kind: pipeline
|
||
|
type: docker
|
||
|
name: test
|
||
|
|
||
|
steps:
|
||
|
- name: test
|
||
|
image: golang:1.19
|
||
|
commands:
|
||
|
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||
|
|
||
|
trigger:
|
||
|
event:
|
||
|
- push
|
||
|
- pull_request
|
||
|
branch:
|
||
|
- master
|
||
|
|
||
|
---
|
||
|
kind: pipeline
|
||
|
type: docker
|
||
|
name: check-go-mod
|
||
|
|
||
|
steps:
|
||
|
- name: check go.mod
|
||
|
image: golang:1.19
|
||
|
commands:
|
||
|
- go mod tidy
|
||
|
- git diff --exit-code go.mod
|
||
|
|
||
|
trigger:
|
||
|
event:
|
||
|
- push
|
||
|
- pull_request
|
||
|
branch:
|
||
|
- master
|
||
|
|
||
|
---
|
||
|
kind: pipeline
|
||
|
type: docker
|
||
|
name: golangci-lint
|
||
|
|
||
|
steps:
|
||
|
- name: run golangci-lint
|
||
|
image: golangci/golangci-lint:v1.49
|
||
|
commands:
|
||
|
- golangci-lint run
|
||
|
|
||
|
trigger:
|
||
|
event:
|
||
|
- push
|
||
|
- pull_request
|
||
|
branch:
|
||
|
- master
|
||
|
|
||
|
---
|
||
|
kind: pipeline
|
||
|
type: docker
|
||
|
name: linux-amd64
|
||
|
|
||
|
platform:
|
||
|
os: linux
|
||
|
arch: amd64
|
||
|
|
||
|
steps:
|
||
|
- name: publish
|
||
|
image: plugins/docker
|
||
|
settings:
|
||
|
username:
|
||
|
from_secret: docker_username
|
||
|
password:
|
||
|
from_secret: docker_password
|
||
|
registry: gitea.dwysokinski.me
|
||
|
repo: gitea.dwysokinski.me/kichiyaki/lubimyczytacrss
|
||
|
auto_tag: true
|
||
|
auto_tag_suffix: linux-amd64
|
||
|
dockerfile: Dockerfile
|
||
|
|
||
|
trigger:
|
||
|
event:
|
||
|
- tag
|
||
|
---
|
||
|
kind: pipeline
|
||
|
type: docker
|
||
|
name: manifest
|
||
|
|
||
|
steps:
|
||
|
- name: manifest
|
||
|
image: plugins/manifest
|
||
|
settings:
|
||
|
auto_tag: "true"
|
||
|
ignore_missing: "true"
|
||
|
spec: manifest.tmpl
|
||
|
username:
|
||
|
from_secret: docker_username
|
||
|
password:
|
||
|
from_secret: docker_password
|
||
|
- name: manifest-latest
|
||
|
image: plugins/manifest
|
||
|
settings:
|
||
|
tags: latest
|
||
|
ignore_missing: "true"
|
||
|
spec: manifest.tmpl
|
||
|
username:
|
||
|
from_secret: docker_username
|
||
|
password:
|
||
|
from_secret: docker_password
|
||
|
|
||
|
trigger:
|
||
|
event:
|
||
|
- tag
|
||
|
|
||
|
depends_on:
|
||
|
- linux-amd64
|