helm / chart-releaser

Hosting Helm Charts via GitHub Pages and Releases
Apache License 2.0
653 stars 106 forks source link

fatal: invalid reference: origin/gh-pages; exit status 128 #430

Closed Kerwood closed 3 weeks ago

Kerwood commented 3 weeks ago

When running the chart releaser action I get the following error.

...
Releasing charts...
Updating charts repo index...
cr index -o Kerwood -r helm-charts --push   # <---- Added this "echo" line to see what arguments was used.
Loading index file from git repository .cr-index/index.yaml
fatal: invalid reference: origin/gh-pages
Error: exit status 128

I'm not sure what the fatal: invalid reference: origin/gh-pages means but the branch do exist.

$ git branch -r
  origin/HEAD -> origin/main
  origin/gh-pages
  origin/main

Using v1.6.1 of cr.

Kerwood commented 3 weeks ago

I see that the error is caused by my self.. I am trying to make a centralized helm-chart repo by adding my other application repos as submodules. I forked the chart-releaser-action repo and did a little modification to the lookup_changed_charts() function to find all chart folders in the submodules. See changes here https://github.com/Kerwood/chart-releaser-action/commit/89ebe16f1017a9163016e6db184b5cbf3c04e108

I can replicate the error by

Above produces fatal: invalid reference: origin/gh-pages.

I understand that the issue is not a bug on the cr cli. But any suggestions would be appreciated.

Kerwood commented 3 weeks ago

The chart-releaser-action seems a bit complex and supports a lot use cases I dont need. I think I will create my own simple chart releaser action that supports my need of submodule/subfolder charts.