Skip to content

Commit

Permalink
Remove reference to github api, add documentation for chart-releaser …
Browse files Browse the repository at this point in the history
…cli (#77)

* remove reference to github api, add documentation for chart-releaser cli

Signed-off-by: Moritz Schmitz von Hülst <moritz@hauptstadtoffice.com>
  • Loading branch information
Moritz Schmitz von Hülst authored Jul 27, 2021
1 parent 702702f commit 6eec360
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ A GitHub action to turn a GitHub project into a self-hosted Helm chart repo, usi

### Inputs

For more information on inputs, see the [API Documentation](https://developer.github.com/v3/repos/releases/#input)

- `version`: The chart-releaser version to use (default: v1.2.1)
- `config`: Optional config file for chart-releaser
- `config`: Optional config file for chart-releaser. For more information on the config file, see the [documentation](https://github.com/helm/chart-releaser#config-file)
- `charts_dir`: The charts directory
- `charts_repo_url`: The GitHub Pages URL to the charts repo (default: `https://<owner>.github.io/<project>`)

### Environment variables

- `CR_TOKEN` (required): The GitHub token of this repository (`${{ secrets.GITHUB_TOKEN }}`)

For more information on environment variables, see the [documentation](https://github.com/helm/chart-releaser#environment-variables).

### Example Workflow

Create a workflow (eg: `.github/workflows/release.yml`):
Expand Down Expand Up @@ -60,6 +64,28 @@ jobs:
This uses [@helm/chart-releaser-action](https://www.github.com/helm/chart-releaser-action) to turn your GitHub project into a self-hosted Helm chart repo.
It does this – during every push to `main` – by checking each chart in your project, 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

#### Example using custom config

`workflow.yml`:
```yaml
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.0
with:
charts_dir: charts
config: cr.yaml
charts_repo_url: xxxxxx
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
```

`cr.yaml`:
```yaml
owner: myaccount
git-base-url: https://api.github.com/
```

For options see [config-file](https://github.com/helm/chart-releaser#config-file).

## Code of conduct

Participation in the Helm community is governed by the [Code of Conduct](CODE_OF_CONDUCT.md).

0 comments on commit 6eec360

Please sign in to comment.