You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to do some preprocessing which runs dereferencing on the JSON schema we use for our Helm chart values, before packaging our charts. That means the git diff command in this action always detects changes:
In my mind, it would make sense for cr to only package and release charts where the version has been bumped - at the least optionally, using a flag such as only_package_on_version_change (naming is hard..)
Currently we run the packaging step ourselves, and only detect charts that have changed their version:
source_sha="${{ github.event.pull_request.base.sha }}"# base commit in the PR
target_sha="${{ github.sha }}"# merge commit sha# get the list of charts that have changed
changed="$(git diff --name-only --diff-filter=ACMRT "$source_sha""$target_sha" -- "charts/*/Chart.yaml"| cut -d '/' -f 2)"# check if the PR has modified any chart versions# prevent https://www.shellcheck.net/wiki/SC2030 using '<<<' to read into an array
changed_charts=()
whileread -r chart;do
old_version="$(git show "$source_sha":"charts/$chart/Chart.yaml"| yq '.version')"
new_version="$(yq '.version'"charts/$chart/Chart.yaml")"if [[ "$old_version"!="$new_version" ]];thenecho"::notice::Chart '$chart' has changed from version $old_version to $new_version"
changed_charts+=("$chart")
fidone<<(echo -n "$changed")
(this releases new versions on closed PRs, so I guess this needs some changes in order to also run on pushes to main and other cases)
The text was updated successfully, but these errors were encountered:
We need to do some preprocessing which runs dereferencing on the JSON schema we use for our Helm chart values, before packaging our charts. That means the
git diff
command in this action always detects changes:chart-releaser-action/cr.sh
Line 297 in d1e09fd
In my mind, it would make sense for
cr
to only package and release charts where the version has been bumped - at the least optionally, using a flag such asonly_package_on_version_change
(naming is hard..)Currently we run the packaging step ourselves, and only detect charts that have changed their version:
(this releases new versions on closed PRs, so I guess this needs some changes in order to also run on pushes to
main
and other cases)The text was updated successfully, but these errors were encountered: