From 530d054adbf3f59c90f90298737f3bc5ba3f2716 Mon Sep 17 00:00:00 2001 From: Satinder Singh Date: Thu, 11 Jan 2024 00:10:08 -0800 Subject: [PATCH] feat: ci should commit index.yaml and push to docker hub (#2600) --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5f9933a9..fde737e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -225,9 +225,17 @@ jobs: newChartVersion=$(echo $currentChartVersion | awk -F. -v OFS=. '{$NF++;print}') sed -i "s/version: .*/version: $newChartVersion/g" ./charts/casdoor/Chart.yaml + REGISTRY=oci://registry-1.docker.io/casbin + cd charts/casdoor + helm package . + PKG_NAME=$(ls *.tgz) + helm repo index . --url $REGISTRY --merge index.yaml + helm push $PKG_NAME $REGISTRY + rm $PKG_NAME + # Commit and push the changes back to the repository git config --global user.name "casbin-bot" git config --global user.email "casbin-bot@github.com" - git add ./charts/casdoor/Chart.yaml + git add Chart.yaml index.yaml git commit -m "chore(helm): bump helm charts appVersion to ${{steps.get-current-tag.outputs.tag }}" git push origin HEAD:master