Skip to content

Commit

Permalink
Merge pull request #229 from alexander-demicev/fixworkflow
Browse files Browse the repository at this point in the history
Fix chart update workflow
  • Loading branch information
alexander-demicev committed Jun 26, 2023
2 parents e30c5e0 + 896bc10 commit 88c0c38
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/scripts/update-rancher-charts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ find ./packages/rancher-aks-operator/ -type f -exec sed -i -e "s/version: ${PREV
if [ "${REPLACE}" == "true" ]; then
sed -i -e "s/${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}/${NEW_CHART_VERSION}+up${NEW_AKS_OPERATOR_VERSION}/g" release.yaml
else
sed -i -e "s/${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}/${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}\n${NEW_CHART_VERSION}+up${NEW_AKS_OPERATOR_VERSION}/g" release.yaml
if grep -qv "rancher-aks-operator:" release.yaml; then
sed -i -e "s/${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}/${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}\n - ${NEW_CHART_VERSION}+up${NEW_AKS_OPERATOR_VERSION}/g" release.yaml
isChartPresent=$(cat release.yaml | grep -c "rancher-aks-operator:")
if [ $isChartPresent -eq 0 ]; then

cat <<< "rancher-aks-operator:
- ${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}
Expand Down

0 comments on commit 88c0c38

Please sign in to comment.