helm/chart-releaser-action

Would be nice to have possibility to ignore releasing charts if such release already exists.

fog1985 opened this issue ยท 6 comments

For now, it just fails with saying that this release already exists. And I get failed pipeline etc.
If for any the release was triggered for the same tag or code version and it's already there it would be nice to see it saying that the release is already there and passing successfully and not failing and breaking the whole pipeline.

I think the --skip-existing flag is designed to support this.

https://github.com/helm/chart-releaser#create-github-releases-from-helm-chart-packages

I think the --skip-existing flag is designed to support this.

https://github.com/helm/chart-releaser#create-github-releases-from-helm-chart-packages

Hi @stevehipwell ,
Thank you for the reply.
Yes, this option is available if you do it all manually or via your own script.
The issue I have opened is for GH actions chart-releaser.

E.G.:

      - name: Run chart-releaser
        uses: helm/chart-releaser-action@v1.2.1
        ...

There is almost no parameters or possibility to pass any. Like you have pointed out --skip-existing for example.
Here it is: https://github.com/marketplace/actions/helm-chart-releaser

@fog1985 if you upgrade to the v2 pattern as documented on the README you can provide command line args. The metrics-server & external-dns repos have this pattern and flag.

Hi @stevehipwell ,
Thank you for the help. I didn't know that this GH action can use ENV variables for cr cli. And that they will be passed.
I mean these ones: https://github.com/helm/chart-releaser#environment-variables
Passed env variable and it seems that it has fixed my issues.
Still there is no v2 GH action.
Only 1.2.1:

      - name: Run chart-releaser
        uses: helm/chart-releaser-action@v1.2.1
        with:
          charts_dir:  charts
        env:
          CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
          CR_SKIP_EXISTING: true

@fog1985 sorry I mixed up the testing and release actions, I would also like to see a v2 release action based on the chart testing action v2 for this reason. For testing actions we can set args, for the release action we need to use the env variables. I'm glad to see that you found this out despite my confusing reply.

Since most repos contain multiple charts. Shouldn't this CR_SKIP_EXISTING: true be default? and allow others to set to false. Most cases true makes sense.