container-library/.drone.yml

126 lines
2.4 KiB
YAML
Raw Normal View History

2021-10-09 13:51:41 +02:00
---
kind: pipeline
name: test
platform:
os: linux
arch: amd64
steps:
2021-10-09 13:55:49 +02:00
- name: lint
image: koalaman/shellcheck-alpine:stable
commands:
2021-10-09 14:03:50 +02:00
- shellcheck --version
2021-10-09 14:10:11 +02:00
- grep -ErlI '^#!(.*/|.*env +)(sh|bash|ksh)' ./overlay/ | xargs shellcheck
2021-10-09 13:55:49 +02:00
2021-10-09 13:51:41 +02:00
- name: markdownlint
image: thegeeklab/markdownlint-cli
commands:
- markdownlint 'README.md'
trigger:
ref:
- refs/heads/main
- refs/pull/**
- refs/tags/**
---
kind: pipeline
2021-10-09 13:57:43 +02:00
name: build-package
2021-10-09 13:51:41 +02:00
platform:
os: linux
arch: amd64
steps:
- name: package
image: thegeeklab/alpine-tools
commands:
- mkdir dist/
2021-10-09 13:58:27 +02:00
- tar -C ./overlay -zcvf dist/container-library.tar.gz .
2021-10-09 13:51:41 +02:00
- 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}
- name: changelog-format
image: thegeeklab/alpine-tools
commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
- 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/**
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
2023-02-08 21:24:15 +01:00
template: "Status: **{{ .Build.Status }}**<br/> Build: [{{ .Repo.Owner }}/{{ .Repo.Name }}]({{ .Build.Link }}){{ if .Build.Branch }} ({{ .Build.Branch }}){{ end }} by {{ .Commit.Author }}<br/> Message: {{ .Commit.Message.Title }}"
2021-10-09 13:51:41 +02:00
username:
from_secret: matrix_username
when:
status:
- success
- failure
trigger:
ref:
- refs/heads/main
- refs/tags/**
status:
- success
- failure
depends_on:
2021-10-09 13:57:43 +02:00
- build-package
2021-10-09 13:51:41 +02:00
---
kind: signature
2023-02-08 21:24:15 +01:00
hmac: 84c6339bfe7ef512611d4732b5edb1c42ac8ed3a136fa2fcfd56a82c5a7c1e9b
2021-10-09 13:51:41 +02:00
...