-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
39 lines (34 loc) · 1.04 KB
/
action.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
name: "Warren - Docker Containers"
description: "Start docker-compose for integration tests"
branding:
icon: "layers"
color: "red"
inputs:
docker-compose-file:
description: "The docker-compose file path (absolute, relative or pattern paths are acceptable)"
required: true
runs:
using: composite
steps:
- name: "Stop all containers"
shell: bash
run: docker stop $(docker ps -a -q) || true
- name: "Remove all containers"
shell: bash
run: docker rm $(docker ps -a -q) || true
- name: "Stop Docker Dependencies"
shell: bash
env:
DOCKER_COMPOSE_FILE: ${{ inputs.docker-compose-file }}
run: docker compose -f $DOCKER_COMPOSE_FILE down
- name: "Wait for Dependencies to Start"
shell: bash
run: sleep 5s
- name: "Start Docker Dependencies"
shell: bash
env:
DOCKER_COMPOSE_FILE: ${{ inputs.docker-compose-file }}
run: docker compose -f $DOCKER_COMPOSE_FILE up -d
- name: "Wait for Dependencies to Start"
shell: bash
run: sleep 10s