Skip to content

Commit

Permalink
ci: check release
Browse files Browse the repository at this point in the history
Check docs/helm templates.
  • Loading branch information
sergelogvinov committed Apr 29, 2023
1 parent da3bcc5 commit 82ee8e1
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/release-pre.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release check

on:
pull_request:
branches:
- main

jobs:
build-publish:
name: "Check release docs"
runs-on: ubuntu-22.04
if: startsWith(github.head_ref, 'release-')
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Unshallow
run: git fetch --prune --unshallow

- name: Release version
shell: bash
id: release
run: |
echo "TAG=${GITHUB_HEAD_REF:8}" >> "$GITHUB_ENV"
- name: Helm docs
uses: gabe565/setup-helm-docs-action@v1

- name: Generate
run: make docs
- name: Check
run: git diff --exit-code
Empty file added CHANGELOG.md
Empty file.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ docs:
charts/proxmox-csi-plugin > docs/deploy/proxmox-csi-plugin-talos.yml
helm-docs charts/proxmox-csi-plugin

release-update:
git-chglog --config hack/chglog-config.yml -o CHANGELOG.md

############
#
# Docker Abstractions
Expand Down
2 changes: 1 addition & 1 deletion charts/proxmox-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ maintainers:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.2
version: 0.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
22 changes: 22 additions & 0 deletions hack/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})

Welcome to the {{ .Tag.Name }} release of Talos CCM!

### Changelog

{{ range .Commits -}}{{ if ne .Subject "" -}}
* {{ .Hash.Short }} {{ .Header }}
{{ end }}{{ end }}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}

{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
27 changes: 27 additions & 0 deletions hack/chglog-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/sergelogvinov/proxmox-csi-plugin
options:
commits:
# filters:
# Type:
# - feat
# - fix
# - perf
# - refactor
commit_groups:
# title_maps:
# feat: Features
# fix: Bug Fixes
# perf: Performance Improvements
# refactor: Code Refactoring
header:
pattern: "^(\\w*)\\:\\s(.*)$"
pattern_maps:
- Type
- Subject
notes:
keywords:
- BREAKING CHANGE

0 comments on commit 82ee8e1

Please sign in to comment.