Support actions triggered by a tag (#96)

The original helm/chart-releaser-action does not work on actions triggered by a tag because the `lookup_changed_charts` will never find differences in the charts. The problem is that `lookup_latest_tag` returns the tag that triggered the action, which is the current commit analyzed by `lookup_changed_charts`.

This simple solution skips the current (tagged) commit when searching for tags.

Signed-off-by: Luis Gracia <lgraval@gmail.com>
This commit is contained in:
Luis Gracia
2023-03-24 12:08:40 +01:00
committed by GitHub
parent 31bbcdca8b
commit db5211eb38
+1 -1
View File
@@ -234,7 +234,7 @@ install_chart_releaser() {
lookup_latest_tag() {
git fetch --tags > /dev/null 2>&1
if ! git describe --tags --abbrev=0 2> /dev/null; then
if ! git describe --tags --abbrev=0 HEAD~ 2> /dev/null; then
git rev-list --max-parents=0 --first-parent HEAD
fi
}