Skip to content

Sync Grafana Dashboards #3116

Sync Grafana Dashboards

Sync Grafana Dashboards #3116

Workflow file for this run

name: "Sync Grafana Dashboards"
permissions:
# Permissions to push to branch and create a PR
pull-requests: write
contents: write
on:
workflow_dispatch:
schedule:
- cron: "0 */3 * * *"
env:
GRAFANA_API_KEY: ${{ secrets.GRAFANA_API_KEY }}
jobs:
grafana-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3
- uses: pnpm/action-setup@537643d491d20c2712d11533497cb47b2d0eb9d5 # pin https://github.com/pnpm/action-setup/releases/tag/v2.2.3
with:
version: 7.13.4
run_install: |
- recursive: false
args: [--frozen-lockfile]
- name: Download current Grafana dashboards
run: pnpm exec scripts/grafana-sync.mts download
- name: Create Pull Request
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f # pin@v4
with:
add-paths: dashboards
title: "[dashboards] sync grafana dashboards"
body: Automated dashboard sync from Grafana
commit-message: "[dashboards] sync grafana dashboards"
branch: sync-grafana-dashboards
delete-branch: true