127 lines
2.3 KiB
YAML
127 lines
2.3 KiB
YAML
|
---
|
||
|
kind: pipeline
|
||
|
name: test
|
||
|
|
||
|
platform:
|
||
|
os: linux
|
||
|
arch: amd64
|
||
|
|
||
|
steps:
|
||
|
- name: markdownlint
|
||
|
image: thegeeklab/markdownlint-cli
|
||
|
commands:
|
||
|
- markdownlint 'README.md'
|
||
|
|
||
|
trigger:
|
||
|
ref:
|
||
|
- refs/heads/main
|
||
|
- refs/pull/**
|
||
|
- refs/tags/**
|
||
|
|
||
|
---
|
||
|
kind: pipeline
|
||
|
name: build-container
|
||
|
|
||
|
platform:
|
||
|
os: linux
|
||
|
arch: amd64
|
||
|
|
||
|
steps:
|
||
|
- name: package
|
||
|
image: thegeeklab/alpine-tools
|
||
|
commands:
|
||
|
- mkdir dist/
|
||
|
- tar -C ./overlay -zcvf dist/container-library.tar.gz -X .
|
||
|
|
||
|
- name: checksum
|
||
|
image: thegeeklab/alpine-tools
|
||
|
commands:
|
||
|
- cd dist/ && sha256sum * > ../sha256sum.txt
|
||
|
|
||
|
- name: changelog-generate
|
||
|
image: thegeeklab/git-chglog
|
||
|
commands:
|
||
|
- git fetch -tq
|
||
|
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
|
||
|
depends_on:
|
||
|
- tags
|
||
|
|
||
|
- name: changelog-format
|
||
|
image: thegeeklab/alpine-tools
|
||
|
commands:
|
||
|
- prettier CHANGELOG.md
|
||
|
- prettier -w CHANGELOG.md
|
||
|
depends_on:
|
||
|
- changelog-generate
|
||
|
|
||
|
- name: publish-gitea
|
||
|
image: plugins/gitea-release
|
||
|
settings:
|
||
|
api_key:
|
||
|
from_secret: gitea_token
|
||
|
base_url: https://gitea.rknet.org
|
||
|
files:
|
||
|
- dist/*
|
||
|
- sha256sum.txt
|
||
|
note: CHANGELOG.md
|
||
|
overwrite: true
|
||
|
title: ${DRONE_TAG}
|
||
|
when:
|
||
|
ref:
|
||
|
- refs/tags/**
|
||
|
depends_on:
|
||
|
- publish-dockerhub
|
||
|
- publish-quay
|
||
|
|
||
|
trigger:
|
||
|
ref:
|
||
|
- refs/heads/main
|
||
|
- refs/pull/**
|
||
|
- refs/tags/**
|
||
|
|
||
|
depends_on:
|
||
|
- test
|
||
|
|
||
|
---
|
||
|
kind: pipeline
|
||
|
name: notifications
|
||
|
|
||
|
platform:
|
||
|
os: linux
|
||
|
arch: amd64
|
||
|
|
||
|
steps:
|
||
|
- name: matrix
|
||
|
image: thegeeklab/drone-matrix
|
||
|
settings:
|
||
|
homeserver:
|
||
|
from_secret: matrix_homeserver
|
||
|
password:
|
||
|
from_secret: matrix_password
|
||
|
roomid:
|
||
|
from_secret: matrix_roomid
|
||
|
template: "Status: **{{ build.Status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.Link }}){{#if build.Branch}} ({{ build.Branch }}){{/if}} by {{ commit.Author }}<br/> Message: {{ commit.Message.Title }}"
|
||
|
username:
|
||
|
from_secret: matrix_username
|
||
|
when:
|
||
|
status:
|
||
|
- success
|
||
|
- failure
|
||
|
|
||
|
trigger:
|
||
|
ref:
|
||
|
- refs/heads/main
|
||
|
- refs/tags/**
|
||
|
status:
|
||
|
- success
|
||
|
- failure
|
||
|
|
||
|
depends_on:
|
||
|
- build-container
|
||
|
|
||
|
---
|
||
|
kind: signature
|
||
|
hmac: 3d3a49cd900fe822c6568d4f2f2e6e9d628ddf2aca147079658b117c8de92c45
|
||
|
|
||
|
...
|