Skip to content

Commit

Permalink
Add helm-lint action (#29)
Browse files Browse the repository at this point in the history
* add helm-lint command
  • Loading branch information
jgreat authored Oct 10, 2024
1 parent 8a6e75b commit 2e770e4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
docker:
runs-on: [self-hosted, Linux, small]
runs-on: mco-dev-small-x64
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:

jobs:
gh-release:
runs-on: [self-hosted, Linux, small]
runs-on: mco-dev-small-x64
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
tag:
runs-on: [self-hosted, Linux, small]
runs-on: mco-dev-small-x64
steps:
# We need to use an external PAT here because GHA will not run downstream events if we use the built in token.
- name: Checkout
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ Deploy helm chart in target namespace/cluster
| `rancher_url` | `string` | Rancher Server URL |
| `rancher_token` | `string` | Rancher API Token |

### helm-lint

Lint all the helm charts in the current workspace.

```yaml
- name: Lint Helm Charts
uses: mobilecoinofficial/[email protected]
with:
action: helm-lint
```

### helm-release-delete

Delete a helm release in the target namespace/cluster.
Expand Down
13 changes: 13 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,19 @@ then
fi
;;

helm-lint)
# Lint all the helm charts in the repo
chart_files=$(find . -name Chart.yaml -type f)

# helm lint on directories where there are chart.yaml files
for c in ${chart_files}
do
chart=$(dirname "${c}")
echo "-- Linting ${chart}"
helm lint --quiet "${chart}" 2>&1
done
;;

helm-release-delete)
# Delete a helm release
rancher_get_kubeconfig
Expand Down

0 comments on commit 2e770e4

Please sign in to comment.