appany/helm-oci-chart-releaser

appany/helm-oci-chart-releaser:0.4.0 Helm Push is broken (+ incorrect status) on ubuntu-20.04

rowi1de opened this issue · 3 comments

Describe the bug

  • Helm Push is broken: The Helm Package is saving to wrong location or file
  • Even the package wasn't pushed, the workflow reported success

To Reproduce

  • The Workflow stopped working without changing the version
  • Version: appany/helm-oci-chart-releaser@v0.4.0
jobs:
  helm-publish-and-release-charts:
   # if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
    runs-on: ubuntu-latest 
	- name: Push helm-app chart
	        uses: appany/helm-oci-chart-releaser@v0.4.0
	        with:
	          repository: some-service
	          registry: ghcr.io/${{ github.repository_owner }}
	          registry_username: __token__
	          registry_password: ${{ secrets.GITHUB_TOKEN }}
	          name: service-app
	          path: k8s/helm-app
	          tag: 1.2.3

From the logs you see that the helm push is not finding the output:

Run echo *** | helm registry login -u __token__ --password-stdin ghcr.io/xxx
Login succeeded
  helm package k8s/helm-app --version 0.0.123
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    HELM_EXPERIMENTAL_OCI: 1
Successfully packaged chart and saved it to: 

saved it to: is literally empty

The following helm push is assuming the previous step was successful:

  helm push service-app-0.0.123.tgz oci://ghcr.io/xxx/yyy
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    HELM_EXPERIMENTAL_OCI: 1
The Kubernetes package manager

To begin working with Helm, run the 'helm init' command:

	$ helm init

This will set up any necessary local configuration.

It will just print the helm help, because the packaged file could not be found

I can't reproduce this on v0.4.0, does your directory k8s/helm-app contains service-app?

  - name: Chart
    uses: appany/helm-oci-chart-releaser@v0.4.0
    with:
      name: ${{ ... }}
      repository: ${{ ... }}
      tag: ${{ steps.release.outputs.tag }}
      path: src
      registry: ${{ ... }}
      registry_username: ${{ ... }}
      registry_password: ${{ ... }}

image
image

@sergeyshaykhullin thanks for looking into it.
Sorry the bug was on my end, we included the following action, which installed helm version 3.0.0.-alpha1 for some reasons

- name: Install helm
        uses: Azure/setup-helm@v1

However this action still reports success, even if nothing was pushed .. this could be a nice improvement

Yes, introducing errors that would break a workflow when raised can help in finding issues for stabilising the pipelines.