-
Notifications
You must be signed in to change notification settings - Fork 58
57 lines (55 loc) · 1.67 KB
/
install-docker.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
name: Test App Install
on:
pull_request: {}
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Environment Information
run: |
echo "====== Docker Info ======"
docker info
echo "========================="
echo "== Docker Compose Info =="
docker compose version
echo "========================="
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22.2"
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
shell: bash
run: |
pip install -r requirements.txt
- name: Install Go Dependencies
run: go mod download
# TODO: Find changed files
# TODO: for each app, loop over the ci/ directory and do the below process
- name: Render template
shell: bash
run: |
./main.py > docker-compose.yaml
- name: Preview template
shell: bash
run: |
# Print the parsed, by compose, template
# (as it will also remove empty lines)
docker compose -f docker-compose.yaml config
- name: Generate random project name
shell: bash
run: |
echo "PROJECT_NAME=$(openssl rand -hex 12)" >> $GITHUB_ENV
- name: Up containers
shell: bash
run: |
docker compose -p $PROJECT_NAME -f docker-compose.yaml up -d
- name: Wait containers
shell: bash
run: |
go run check_health.go --project $PROJECT_NAME --files docker-compose.yaml