From 47ba299ac71b90c015d4bd24af1cd8bcef3736c0 Mon Sep 17 00:00:00 2001 From: Evan Hearne Date: Wed, 15 May 2024 13:43:24 +0100 Subject: [PATCH] created dashboard github action --- .github/workflows/upload-dashboards.yaml | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/upload-dashboards.yaml diff --git a/.github/workflows/upload-dashboards.yaml b/.github/workflows/upload-dashboards.yaml new file mode 100644 index 000000000..b68e79668 --- /dev/null +++ b/.github/workflows/upload-dashboards.yaml @@ -0,0 +1,41 @@ +name: Upload Dashboards + +on: + push: + branches: + - main + paths: + - examples/dashboards/app_developer.json + - examples/dashboards/business_user.json + - examples/dashboards/platform_engineer.json + +jobs: + upload-dashboards: + name: Upload Dashboards + runs-on: ubuntu-latest + defaults: + run: + shell: bash + steps: + - name: + run: + # Push new dashboard changes + + # App Developer Dashboard + curl -X POST \ + -F 'files=json=examples/dashboards/app_developer.json' \ + -H 'Content-Type: multipart/form-data' \ + -H 'Authorization: ' + https://${{ secrets.GRAFANA_USERNAME }}:${{ secrets.GRAFANA_PASSWORD }}@grafana.com/api/dashboards/20970/revisions + + # Business User Dashboard + curl -X POST \ + -F 'files=json=examples/dashboards/business_user.json' \ + -H 'Content-Type: multipart/form-data' \ + https://${{ secrets.GRAFANA_USERNAME }}:${{ secrets.GRAFANA_PASSWORD }}@grafana.com/api/dashboards/20981/revisions + + # Platform Engineer Dashboard + curl -X POST \ + -F 'files=json=examples/dashboards/platform_engineer.json' \ + -H 'Content-Type: multipart/form-data' \ + https://${{ secrets.GRAFANA_USERNAME }}:${{ secrets.GRAFANA_PASSWORD }}@grafana.com/api/dashboards/20982/revisions