Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bitnami/chart-categories-action

A GitHub action to check Helm Charts categories
https://github.com/bitnami/chart-categories-action

actions charts github-actions helm

Last synced: 8 days ago
JSON representation

A GitHub action to check Helm Charts categories

Awesome Lists containing this project

README

        

# Charts Categories GitHub Action

This action checks that all the Helm Charts in the repository have a category and the category belongs to a pre-defined list of categories.

The categories should be set at the `Chart.yaml` file in the way:

```yaml
annotations:
category: category-name
```

## Inputs

### `command`

**Required** The command to pass to the `category-checker.sh` script. **Default**: `check-categories`. (At this moment only `check-categories` is supported)

### `categories-file`

The path to the file containing the categories inside your Helm Chart repository. **Default**: `CHART_CATEGORIES`.

## Outputs

### `categories-are-correct`

Whether or not the changed Helm Charts have a correct category.

## Example usage

```yaml
check-categories:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Fetch history
run: git fetch --prune --unshallow

- name: Check categories
uses: bitnami/chart-categories-action@master
with:
command: 'check-categories'
categories-file: 'my_Categories_file'
```

See: https://github.com/bitnami/charts/blob/master/.github/workflows/lint-test.yaml

## Pending improvements

- [X] Add option to pass your own list of categories.

## How to debug this action locally

Build the docker image:

```
docker build . -t
```

Run the image mounting your Helm Charts repository:

```
docker run --rm -v :/github/workspace --workdir /github/workspace -it check-categories
```

## License

Copyright © 2024 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.