-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.61 KB
/
dashboards.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Get Dashboards updates
on:
push:
branches:
- dev
workflow_dispatch:
schedule:
- cron: '0 0 * * 1'
jobs:
update-dashboards:
runs-on: ubuntu-latest
steps:
- name: Checkout Current Repository
uses: actions/checkout@v4
with:
path: current-repo
- name: Checkout Kexa Dashboards Repository
uses: actions/checkout@v4
with:
repository: 'kexa-io/grafana-dashboards'
path: external-repo
- name: List Files in Repositories
run: |
echo "Listing files in current-repo:"
ls -R current-repo
echo "Listing files in external-repo:"
ls -R external-repo
shell: bash
- name: Create Target Directory
run: |
mkdir -p current-repo/kexa-chart/files/dashboards
shell: bash
- name: Copy Files
run: |
cp -f external-repo/*.json current-repo/kexa-chart/files/dashboards/
shell: bash
- name: List Target Directory
run: |
echo "Files in target directory after copy:"
ls -R current-repo/kexa-chart/files/dashboards/
shell: bash
- name: Configure Git
run: |
git config --global user.name "Adrien E"
git config --global user.email "[email protected]"
working-directory: current-repo
- name: Commit changes
run: |
git add kexa-chart/files/dashboards/
git commit -m "Get new dashboards"
git push
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
working-directory: current-repo