From 8b61200f6b39c8af82f1538f4cb044358757a72f Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Sun, 24 Nov 2019 11:32:13 -0500 Subject: [PATCH] Initial Readme Signed-off-by: Scott Rigby --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..fb5a3f2 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# Chart releaser action + +A GitHub action to turn a GitHub repo into a self-hosted Helm chart repo, using [helm/chart-releaser](https://github.com/helm/chart-releaser) CLI tool. + +## Usage + +### Pre-requisites + +1. A GitHub repo containing a directory with your Helm charts (eg: `/charts`) +1. A GitHub token +1. Create a workflow `.yml` file in your `.github/workflows` directory. An [example workflow](#example-workflow) is available below. For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file). + +### Inputs + +For more information on these inputs, see the [API Documentation](https://developer.github.com/v3/repos/releases/#input) + +- `charts-dir`: The charts directory +- `charts-repo-url`: The GitHub Pages URL to the charts repo (default: `https://.github.io/`) +- `token`: The GitHub token + +### Example workflow + +Create a workflow (eg: .github/workflows/chart-testing.yml see Creating a Workflow file): + +```yaml +name: chart actions + +on: + push: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1 + with: + token: "${{ secrets.GITHUB_TOKEN }}" +``` + +This uses [`@helm/chart-releaser-action`](https://www.github.com/helm/chart-releaser-action) to turn a GitHub repo into a self-hosted Helm chart repo. It does this – during every push to `master` – by checking each chart in your GitHub repo, and whenever there's a new chart version, creates a corresponding [GitHub release](https://help.github.com/en/github/administering-a-repository/about-releases) named for the chart version, adds Helm chart artifacts to the release, and creates or updates an `index.yaml` file with metadata about those releases which is then hosted on GitHub Pages. + +## Code of conduct + +Participation in the Helm community is governed by the [Code of Conduct](code-of-conduct.md).