Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 20, 2024
1 parent ffafdf5 commit 1f38def
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions tag_publish/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def _handle_helm_publish(
) -> bool:
success = True
helm_config = config.get("helm", {})
if helm_config.get("folders") and version_type in helm_config.get(
if helm_config.get("packages") and version_type in helm_config.get(
"versions", tag_publish.configuration.HELM_VERSIONS_DEFAULT
):
tag_publish.download_application("helm/chart-releaser")
Expand Down Expand Up @@ -550,22 +550,13 @@ def _handle_helm_publish(
f'{group}'
)
if package.get("group", tag_publish.configuration.HELM_PACKAGE_GROUP_DEFAULT) == group:
print(
f'version_type: {version_type} in '
f'{helm_config.get("versions", tag_publish.configuration.HELM_VERSIONS_DEFAULT)}'
)
publish = version_type in helm_config.get(
"versions", tag_publish.configuration.HELM_VERSIONS_DEFAULT
)
print(publish)
if publish:
folder = package.get("folder", tag_publish.configuration.HELM_PACKAGE_FOLDER_DEFAULT)
if dry_run:
print(f"Publishing '{folder}' to helm, skipping (dry run)")
else:
token = os.environ["GITHUB_TOKEN"]
success &= tag_publish.publish.helm(folder, version, owner, repo, commit_sha, token)
published_payload.append({"type": "helm", "folder": folder})
folder = package.get("folder", tag_publish.configuration.HELM_PACKAGE_FOLDER_DEFAULT)
if dry_run:
print(f"Publishing '{folder}' to helm, skipping (dry run)")
else:
token = os.environ["GITHUB_TOKEN"]
success &= tag_publish.publish.helm(folder, version, owner, repo, commit_sha, token)
published_payload.append({"type": "helm", "folder": folder})
return success


Expand Down

0 comments on commit 1f38def

Please sign in to comment.