28 lines
789 B
YAML
28 lines
789 B
YAML
|
name: docker_main
|
||
|
|
||
|
on:
|
||
|
workflow_run:
|
||
|
workflows: ["tests"]
|
||
|
branches: [main]
|
||
|
types:
|
||
|
- completed
|
||
|
|
||
|
# TODO: Needs refactoring to use reusable workflows and share w/ docker_tests
|
||
|
jobs:
|
||
|
on-success:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: checkout code
|
||
|
uses: actions/checkout@v2
|
||
|
- name: build and test (docker)
|
||
|
run: |
|
||
|
docker build --tag whoogle-search:test .
|
||
|
docker run --publish 5000:5000 --detach --name whoogle-search whoogle-search:test
|
||
|
sleep 15
|
||
|
docker exec whoogle-search curl -f http://localhost:5000/healthz || exit 1
|
||
|
- name: build and test (docker-compose)
|
||
|
run: |
|
||
|
docker-compose up --detach
|
||
|
sleep 15
|
||
|
docker exec whoogle-search curl -f http://localhost:5000/healthz || exit 1
|