-
Notifications
You must be signed in to change notification settings - Fork 35
52 lines (48 loc) · 1.43 KB
/
dashboards-ci.yml
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
name: Dashboards CI
# this workflow will
# - check for JSON syntax errors on every pull request
# - commit to the OBS development upstream whenever the main branch is updated
on:
push:
branches: [main]
paths:
- "Makefile"
- "dashboards/**"
- "packaging/obs/grafana-ha-cluster-dashboards/**"
- ".github/workflows/dashboards*"
pull_request:
paths:
- "Makefile"
- "dashboards/**"
- "packaging/obs/grafana-ha-cluster-dashboards/**"
- ".github/workflows/dashboards*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
- run: npm -g install jsonlint
- name: validate JSON
run: find dashboards -name "*.json" -type f -exec jsonlint -c {} \;
obs-commit:
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
container:
image: ghcr.io/trento-project/continuous-delivery:0.1.0
options: -u 0:0
env:
OBS_USER: ${{ secrets.OBS_USER }}
OBS_PASS: ${{ secrets.OBS_PASS }}
OBS_PROJECT: ${{ secrets.OBS_PROJECT }}
REVISION: ${{ github.sha }}
REPOSITORY: ${{ github.repository }}
GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: configure OSC
run: /scripts/init_osc_creds.sh
- run: make dashboards-obs-commit