Code Monkey home page Code Monkey logo

helm-gh-pages's Issues

Adding option directory publish

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

Skip files and non-chart folders

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

Thoughts on replacing already published charts

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!

user specified "charts_dir" argument doesnt work with the Action

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.

Screenshot 2021-02-03 152956

Screenshot 2021-02-03 152737

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

Fail to publish charts with dependencies stored on the same repository (when private)

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.

Support storing charts in sub-folder

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.

Case for Github page using main branch /docs folder

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.

Root directory chart

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: .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.