From 68ccbfd8a0f28b70310a754c166aa0355e36ead2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 28 Nov 2024 12:43:30 +0100 Subject: [PATCH] Set Git user --- tag_publish/publish.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tag_publish/publish.py b/tag_publish/publish.py index 539ff3f..a8af249 100644 --- a/tag_publish/publish.py +++ b/tag_publish/publish.py @@ -290,6 +290,12 @@ def helm(folder: str, version: str, owner: str, repo: str, commit_sha: str, toke if dependency["repository"].startswith("https://"): subprocess.run(["helm", "repo", "add", str(index), dependency["repository"]], check=True) + if subprocess.run(["git", "config", "user.email"], capture_output=True).returncode != 0: # pylint: disable=subprocess-run-check + subprocess.run(["git", "config", "--global", "user.email", "tag-publish@gituhb.com"], check=True) + if subprocess.run(["git", "config", "user.name"], capture_output=True).returncode != 0: # pylint: disable=subprocess-run-check + subprocess.run( + ["git", "config", "--global", "user.name", "tag-publish (GitHub Action)"], check=True + ) subprocess.run(["cr", "package", folder], check=True) subprocess.run( [