forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.17 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
37
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