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:
@@ -234,7 +234,7 @@ install_chart_releaser() {
|
|||||||
lookup_latest_tag() {
|
lookup_latest_tag() {
|
||||||
git fetch --tags > /dev/null 2>&1
|
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
|
git rev-list --max-parents=0 --first-parent HEAD
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user