-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.06 KB
/
workflow.yml
File metadata and controls
51 lines (41 loc) · 1.06 KB
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
name: Docker Build and Test
on:
push:
paths:
- 'grafana/**'
- '.github/workflows/workflow.yml'
pull_request:
paths:
- 'grafana/**'
- '.github/workflows/workflow.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Validate docker-compose.yml
run: |
cd grafana
docker compose config
- name: Build Docker images
run: |
cd grafana
docker compose pull
docker compose build
- name: Start services
run: |
cd grafana
docker compose up -d
- name: Wait for Grafana to be ready
run: |
timeout 60 bash -c 'until curl -f http://localhost:3000/api/health; do sleep 2; done'
- name: Check Grafana health
run: |
curl -f http://localhost:3000/api/health
- name: Stop services
if: always()
run: |
cd grafana
docker compose down -v