stefanprodan / helm-gh-pages Goto Github PK
View Code? Open in Web Editor NEWA GitHub Action for publishing Helm charts to Github Pages
License: Apache License 2.0
A GitHub Action for publishing Helm charts to Github Pages
License: Apache License 2.0
Hi
I have a two directory charts
and hosting
, the charts
store helm template and hosting
store chart publish, bellow my command line
$ cd hosting
$ helm package ../private/<chart-name>
helm repo index . --merge index.yaml
Do we have a option to support directory publish
We have a folder in charts folder that is not a chart but is related to charts that this action fails on. We also have a README.md in the charts folder that causes it to fail. It would be nice if the action could skip files and directories that don't have a Chart.yaml.
Also, it should run helm dep up before lint since parent chart may use child values to render templates and fail if it doesn't have those charts downloaded yet.
Or linting should be optional, as we do it in a previous step anyway.
Error: 7 chart(s) linted, 3 chart(s) failed
==> Linting /github/workspace/charts/README.md
Error unable to check Chart.yaml file in chart: stat /github/workspace/charts/README.md/Chart.yaml: not a directory
==> Linting /github/workspace/charts/hedera-mirror
==> Linting /github/workspace/charts/hedera-mirror-common
[ERROR] templates/: template: hedera-mirror-common/templates/NOTES.txt:8:45: executing "hedera-mirror-common/templates/NOTES.txt" at <.Values.traefik.ports.web.exposedPort>: nil pointer evaluating interface {}.exposedPort
==> Linting /github/workspace/charts/hedera-mirror-grpc
==> Linting /github/workspace/charts/hedera-mirror-importer
==> Linting /github/workspace/charts/hedera-mirror-rest
==> Linting /github/workspace/charts/marketplace
Error unable to check Chart.yaml file in chart: stat /github/workspace/charts/marketplace/Chart.yaml: no such file or directory
Hi,
I'm comparing this to https://github.com/helm/chart-releaser-action and besides using github releases, one major difference is that this logic will replace an already published chart ( git add ${TARGET_DIR}
) while the other will not change an existing release. I think not changing an existing release is the right thing to do with helm. Do you want to replicate this behavior here as well? If not, I'm curious why.
Thanks!
I have multiple charts in my repo. I am setting up workflow to run it for specific chart i.e. charts/common
I am passing my charts dir path to Github action as below:
- name: Publish Helm charts
uses: stefanprodan/helm-gh-pages@master
with:
charts_dir: charts/common
token: ${{ secrets.GITHUB_TOKEN }}
however workflow fails while executing the action with below error. Not sure why cant it locate Chart.yaml in the charts dir "charts/common" even though its present there.
Run stefanprodan/helm-gh-pages@master
/usr/bin/docker run --name fff47541574080a7dd09b76af1afed_ae0358 --label 442333 --workdir /github/workspace --rm -e INPUT_CHARTS_DIR -e INPUT_TOKEN -e INPUT_CHARTS_URL -e INPUT_OWNER -e INPUT_REPOSITORY -e INPUT_BRANCH -e INPUT_TARGET_DIR -e INPUT_HELM_VERSION -e INPUT_LINTING -e INPUT_COMMIT_USERNAME -e INPUT_COMMIT_EMAIL -e INPUT_APP_VERSION -e INPUT_CHART_VERSION -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/bb-helmcharts/bb-helmcharts":"/github/workspace" 442333:12fff47541574080a7dd09b76af1afed "" "charts/common" "" "" "" "" "" "" "" "" "*****@users.noreply.github.com" "" ""
Ignoring non-chart directory charts/common/templates
Error: 1 chart(s) linted, 1 chart(s) failed
==> Linting .
Error unable to check Chart.yaml file in chart: stat Chart.yaml: no such file or directory
Hello,
I use helm-gh-pages to store my Helm charts in a private Github repository.
I discovered that when one tries to publish a chart that depends on a subchart present on the same private repository, the action fails with a 404 error.
In particular, I've developed chartB
and published it successfully via helm-gh-pages on my private repo.
I've also developed an umbrella chart (called chartA
) that depends on chartB
. During publishing of chartA
, helm-gh-pages fails with the following error:
Found chart directory charts/chartB
Found chart directory charts/chartA
Getting updates for unmanaged Helm repositories...
Error: no cached repository for helm-manager-zzzzzzzzzzzzzzzzzzzzzz found. (try 'helm repo update'): open /github/home/.cache/helm/repository/helm-manager-zzzzzzzzzzzzzzzzzzzzzz-index.yaml: no such file or directory
...Unable to get an update from the "https://raw.githubusercontent.com/my/helm-charts-repository/gh-pages" chart repository:
failed to fetch https://raw.githubusercontent.com/my/helm-charts-repository/gh-pages : 404 Not Found
(URLs have been anonymised)
The root-cause of this is that helm doesn't have the Github private repository configured using helm repo add
.
A workaround is adding the repo prior to fetching dependencies. For example.
helm repo add ${REPOSITORY} ${CHARTS_URL} --username ${GITHUB_TOKEN} --password ${GITHUB_TOKEN}
Thus, any charts that exist on the Github private repository would be accessible, if used by another chart. I understand that this functionality isn't always desirable. But it can easily toggled-on, when needed.
We want to use GitHub Pages to store both documentation and charts. We'd like store them both in sub-folders so that users can go to either http://<owner>.github.io/<repository>/charts
and http://<owner>.github.io/<repository>/docs
depending upon their need. Currently the action assumes the charts will be in the top level folder.
When define helm package
add ablility to setup --version string
and --app-version
as in documentation:
https://helm.sh/docs/helm/helm_package/
Error: failed to fetch https://${OWNER}.github.io/${REPOSITORY}/docs/xxx-yyy.tgz : 404 Not Found
Github page created using main branch /docs folder so set TARGET_DIR as docs. Then such error occurred.
The CHARTS_URL is defined as https://${OWNER}.github.io/${REPOSITORY}/${TARGET_DIR}.
Seems need to filter the docs case so not add docs to the CHARTS_URL.
Helm provides a method to sign charts see the provenance documentation for more.
Hi there,
I'm refering to fluxcd/charts#2
It would be awesome to pull fluxcd trough an artifactory mirror. To archive this, the urls in the index.yaml need to be relative.
This is possible since Helm v2.8.0.
I think, all it needs is to replace helm repo index . --url ${CHARTS_URL}
with helm repo index . --url ${REPOSITORY}
in Line 87 of the entrypoint.sh.
Does this action support packaging charts that are at the root of the directory? I'm currently seeing Error: need at least one argument, the path to the chart
whenever I set charts_dir: .
Every time a new version of a chart is updated, the created
timestamp of the older versions in the index is also updated.
This seems be because the helm repo index
command redoes all the index entries older and new, as mentioned in helm/helm#7363
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.