ci: auto-generate changelog
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Robert Kaussow 2021-02-10 22:27:44 +01:00
parent 5af7b8c726
commit 264d70856b
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
3 changed files with 58 additions and 9 deletions

23
.chglog/CHANGELOG.tpl.md Executable file
View File

@ -0,0 +1,23 @@
# Changelog
{{ range .Versions -}}
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

23
.chglog/config.yml Executable file
View File

@ -0,0 +1,23 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://gitea.rknet.org/docker/molecule
options:
commit_groups:
title_maps:
feat: Features
fix: Bug Fixes
perf: Performance Improvements
refactor: Code Refactoring
chore: Others
ci: CI Pipeline
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE

View File

@ -30,8 +30,6 @@ steps:
- name: dryrun - name: dryrun
image: thegeeklab/drone-docker-buildx:20 image: thegeeklab/drone-docker-buildx:20
settings: settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile dockerfile: Dockerfile
dry_run: true dry_run: true
password: password:
@ -57,11 +55,18 @@ steps:
depends_on: depends_on:
- dryrun - dryrun
- name: changelog
image: thegeeklab/git-chglog
commands:
- git fetch -tq
- git-chglog --no-color --no-emoji ${DRONE_TAG:---next-tag unreleased unreleased}
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
depends_on:
- tags
- name: publish-dockerhub - name: publish-dockerhub
image: thegeeklab/drone-docker-buildx:20 image: thegeeklab/drone-docker-buildx:20
settings: settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile dockerfile: Dockerfile
password: password:
from_secret: docker_password from_secret: docker_password
@ -73,13 +78,11 @@ steps:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
depends_on: depends_on:
- tags - changelog
- name: publish-quay - name: publish-quay
image: thegeeklab/drone-docker-buildx:20 image: thegeeklab/drone-docker-buildx:20
settings: settings:
build_args:
- BUILD_VERSION=${DRONE_TAG%-*}
dockerfile: Dockerfile dockerfile: Dockerfile
password: password:
from_secret: quay_password from_secret: quay_password
@ -92,7 +95,7 @@ steps:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
depends_on: depends_on:
- tags - changelog
- name: publish-gitea - name: publish-gitea
image: plugins/gitea-release image: plugins/gitea-release
@ -185,6 +188,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: eb9f18a96365cbdd00c38b9e2ef210ceee91a147570a6beae469d328f3d6b8a2 hmac: 9274a1547159dbcd6deb404d5cda31ef411749f396044195219e9b80a59d34ab
... ...