Skip to content

Sync Grafana Dashboards #57

Sync Grafana Dashboards

Sync Grafana Dashboards #57

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_CLOUD_API_KEY }}
jobs:
grafana-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
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