forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1.01 KB
/
grafana-sync.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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