Skip to content

Add Grafana instance with pre-configured dashboard #273

Add Grafana instance with pre-configured dashboard

Add Grafana instance with pre-configured dashboard #273

Workflow file for this run

name: helm lint
on:
push:
branches:
- "**"
pull_request:
branches:
- "master"
jobs:
helm-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref || github.ref }}
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
pip install pyyaml genson
- name: Generate JSON schema
run: |
python ci/yaml-to-schema.py helm/supersonic/values.yaml helm/supersonic/values.schema.json
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Configure Git user
git config user.name "GitHub Actions"
git config user.email "[email protected]"
# Add and commit changes
git pull
git add helm/supersonic/values.schema.json
git commit -m "Update JSON schema" || echo "No changes to commit"
# Push changes back to the same branch
git push origin HEAD:${{ github.head_ref || github.ref }}
- name: Lint values.yaml files in values/ directory
run: |
CHART_PATH="helm/supersonic/"
VALUES_DIR="values/"
for VALUES_FILE in "$VALUES_DIR"/*.yaml; do
echo "Linting with values file: $VALUES_FILE"
helm lint "$CHART_PATH" --values "$VALUES_FILE"
if [ $? -ne 0 ]; then
echo "Helm lint failed for values file: $VALUES_FILE"
exit 1
fi
done