chore: merge develop-v2.2-new into develop #390
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: grafana | |
| on: | |
| pull_request: | |
| merge_group: | |
| push: | |
| branches: [main] | |
| permissions: {} | |
| jobs: | |
| check-dashboard: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Validate dashboard format | |
| run: | | |
| python3 -c " | |
| import json, sys | |
| with open('etc/grafana/dashboards/overview.json') as f: | |
| d = json.load(f) | |
| errors = [] | |
| if '__inputs' not in d: | |
| errors.append('missing __inputs') | |
| if '__requires' not in d: | |
| errors.append('missing __requires') | |
| if d.get('id') is not None: | |
| errors.append('contains internal id field — use export-dashboard.py') | |
| if errors: | |
| for e in errors: | |
| print(f'Error: {e}', file=sys.stderr) | |
| sys.exit(1) | |
| print('✓ overview.json is a valid exported dashboard') | |
| " |