-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (30 loc) · 1.09 KB
/
build.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
name: Build template
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build docker image
run: docker compose build
- name: Check docker logs
run: docker compose logs
- name: Run docker container
run: docker compose up -d
- name: Check docker logs
run: |
docker ps
docker compose logs
curl -v http://localhost:8000/
- name: Test if service is reachable
run: |
sleep 30
curl -v -s --retry 10 --retry-connrefused http://localhost:8000/
- name: Report error to Sentry
if: failure()
run: |
curl -sL https://sentry.io/get-cli/ | bash
export SENTRY_DSN=${{ secrets.SENTRY_DSN }}
MESSAGE_HEAD='Template: "${{ github.workflow }}" failed in ${{ github.repository }}.'
MESSAGE_BODY='Check <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}> for more details.'
sentry-cli send-event -m "$MESSAGE_HEAD" -m "$MESSAGE_BODY" --log-level=error