Skip to content

Commit

Permalink
created dashboard github action
Browse files Browse the repository at this point in the history
  • Loading branch information
ehearneRedHat committed May 15, 2024
1 parent 6aa921e commit 47ba299
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/upload-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 47ba299

Please sign in to comment.