helm / chart-releaser-action

A GitHub Action to turn a GitHub project into a self-hosted Helm chart repo, using helm/chart-releaser CLI tool
https://github.com/helm/chart-releaser
Apache License 2.0
559 stars 206 forks source link

Skip packaging option value #129

Closed dcoraboeuf closed 1 year ago

dcoraboeuf commented 1 year ago

Hi,

I'd like to use the skip_packaging option but whatever value I put in there, the action keeps trying to package the chart (which cannot work in my case).

The workflow:

- name: Run chart-releaser
  uses: helm/chart-releaser-action@v1.5.0
  env:
    skip_packaging: "yes"  # I've tried, with `true`, `"true"`, `1` etc.
    CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

and I get:

Looking up latest tag...
Discovering changed charts since 'ontrack-0.7.7'...
Installing chart-releaser on /opt/hostedtoolcache/cr/v1.5.0/x86_64...
Adding cr directory to PATH...
Packaging chart 'charts/ontrack'...
# Fails here because of the packaging

In the code, I see:

if ! [[ -n "$skip_packaging" ]]; then

so I would expect the else branch to be run.

Any hint would be great.

Thanks, Damien

PS: when using the install_only option, I have exactly the same issue.

dcoraboeuf commented 1 year ago

Well, sometimes writing a ticket is enough to find the solution.

Of course, I was putting the options in the wrong section 🤦

The correct syntax is:

- name: Run chart-releaser
  uses: helm/chart-releaser-action@v1.5.0
  with:
    skip_packaging: "yes"
  env:
    CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"