Skip to content

Commit

Permalink
generate helm values schema
Browse files Browse the repository at this point in the history
  • Loading branch information
petar-cvit authored and yorugac committed Aug 12, 2024
1 parent f75facb commit 735f875
Show file tree
Hide file tree
Showing 4 changed files with 474 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,38 @@ on:
- 'charts/k6-operator/Chart.yaml'

jobs:
generate-chart-schema:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Make changes to the file
run: |
make helm-schema
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Commit and push changes
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
git add charts/k6-operator/values.schema.json
if git diff-index --quiet HEAD; then
echo "No updates to helm values schema"
else
git commit -m "gen schema json"
git push origin HEAD:helm-schema
fi
call-update-helm-repo:
needs:
- generate-chart-schema
permissions:
contents: write
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ deploy-helm: manifests helm
helm-template: manifests helm
$(HELM) template k6-operator ./charts/k6-operator -f ./charts/k6-operator/values.yaml --set manager.image.name=$(IMG_NAME) --set manager.image.tag=$(IMG_TAG)

helm-schema:
go install github.com/dadav/helm-schema/cmd/[email protected]
$(shell go env GOPATH)/bin/helm-schema --chart-search-root ./charts/k6-operator

# Delete operator from a cluster
delete-helm: manifests helm
$(HELM) uninstall k6-operator
Expand Down
Loading

0 comments on commit 735f875

Please sign in to comment.