diff --git a/.github/workflows/sync-helm-charts.yaml b/.github/workflows/sync-helm-charts.yaml index bfa897b146..9e1efc205e 100644 --- a/.github/workflows/sync-helm-charts.yaml +++ b/.github/workflows/sync-helm-charts.yaml @@ -44,10 +44,6 @@ jobs: path: helm-charts-cloned persist-credentials: true - - name: Patch original AKO chart dependencies - run: | - sed -i 's|repository: "file://../../helm-charts/atlas-operator-crds"|repository: "https://mongodb.github.io/helm-charts"|' helm-charts/atlas-operator/Chart.yaml - - name: Generate AKO bundle env: VERSION: "1.0.0" @@ -68,6 +64,10 @@ jobs: run: | devbox run -- "make helm-upd-rbac" + - name: Patch original AKO chart dependencies + run: | + awk '{gsub(/repository: *"file:\/\/..\/..\/helm-charts\/atlas-operator-crds"/, "repository: \"https://mongodb.github.io/helm-charts\"")}1' helm-charts/atlas-operator/Chart.yaml > temp.yaml && mv temp.yaml helm-charts/atlas-operator/Chart.yaml + - name: Verify if helm-charts need to be synced run: | for dir in ./helm-charts/*; do @@ -76,7 +76,6 @@ jobs: echo "Checking for changes in the Chart: $dir" if [[ -n $(diff -r "./helm-charts/$dir" "./helm-charts-cloned/charts/$dir") ]]; then echo "> Changes detected for the Chart: $dir" - diff -r "./helm-charts/$dir" "./helm-charts-cloned/charts/$dir" cp -r "./helm-charts/$dir" "./helm-charts-cloned/charts/$dir" else echo "> No changes detected for the Chart: $dir"