From 6d7b50e469e2b7e6e4e68d0f562a87f086ee73d1 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Thu, 31 Oct 2024 16:52:40 +0100 Subject: [PATCH] [no-relnote] Set git user name and email in subfolder repo Signed-off-by: Evan Lezar --- .github/workflows/publish-helm.yaml | 2 +- hack/update-helm-index.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-helm.yaml b/.github/workflows/publish-helm.yaml index 88415eb1c..566c18762 100644 --- a/.github/workflows/publish-helm.yaml +++ b/.github/workflows/publish-helm.yaml @@ -39,7 +39,7 @@ jobs: - name: Update helm index env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git config user.name "Github Actions" git config user.email "no-reply@github.com" diff --git a/hack/update-helm-index.sh b/hack/update-helm-index.sh index de8d80e12..6c4790763 100755 --- a/hack/update-helm-index.sh +++ b/hack/update-helm-index.sh @@ -144,6 +144,10 @@ if [[ -z ${VERSION} ]]; then VERSION="v$VERSION" fi +# We need to ensure that the user the folder is correct: +git -C ${HELM_REPO_PATH} config user.email "$(git config --get user.email)" +git -C ${HELM_REPO_PATH} config user.name "$(git config --get user.name)" + # Create a new commit echo "Committing changes: \n${changes}" git -C $HELM_REPO_PATH add index.yaml stable