Skip to content

Merge pull request #1 from cloudnative-pg/cluster-dashboard #1

Merge pull request #1 from cloudnative-pg/cluster-dashboard

Merge pull request #1 from cloudnative-pg/cluster-dashboard #1

name: release-publish
on:
push:
branches:
- main
paths:
- 'charts/cluster/grafana-dashboard.json'
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0 # important for fetching all history to run comparison against
- name: Push dashboard to Grafana.com
env:
DASHBOARD_ID: 20417
GRAFANA_COM_TOKEN: ${{secrets.GRAFANA_COM_TOKEN}}
run: |
cat charts/cluster/grafana-dashboard.json | curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Bearer $GRAFANA_COM_TOKEN" --data-binary @- https://grafana.com/api/dashboards/db