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 16, 2024
1 parent 6aa921e commit 3719175
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/upload-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Upload Dashboards

on:
pull_request:
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:
- uses: actions/checkout@v2
- name: Upload Dashboard
run: |
# Push new dashboard changes
# Init variable with base64 auth
auth=$(echo -n ${{ secrets.GRAFANA_USERNAME }}:${{ secrets.GRAFANA_PASSWORD }} | base64)
# App Developer Dashboard
curl -X POST -F "json=@./examples/dashboards/app_developer.json" -H 'Content-Type: multipart/form-data' -H "Authorization: Basic $auth" "https://www.grafana.com/api/dashboards/20970/revisions"
# Business User Dashboard
curl -X POST -F "json=@./examples/dashboards/business_user.json" -H 'Content-Type: multipart/form-data' -H "Authorization: Basic $auth" "https://www.grafana.com/api/dashboards/20981/revisions"
# Platform Engineer Dashboard
curl -X POST -F "json=@./examples/dashboards/platform_engineer.json" -H 'Content-Type: multipart/form-data' -H "Authorization: Basic $auth" "https://www.grafana.com/api/dashboards/20982/revisions"

0 comments on commit 3719175

Please sign in to comment.