cc-docker/.github/workflows/ccdocker_demo_startup.yml
2021-08-06 14:01:45 +02:00

55 lines
1.5 KiB
YAML

# This is the workflow for testing cc-docker startup in demo mode
# This will be automatic on specified event, but is set to manual while experimenting with workflows
name: ccdocker-demo-startup
# Controls when the action will run. Workflow runs when manually triggered using the UI
on:
workflow_dispatch:
jobs:
# This workflow contains a single job
demo-startup:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Set timeout
timeout-minutes: 10
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- name: Checkout latest cc-docker
uses: actions/checkout@v2
- name: Build containers
run: docker-compose -f "docker-compose.yml" build
- name: Run containers
run: docker-compose -f "docker-compose.yml" up -d
- name: Giving containers 60s to load
run: sleep 60s
- name: Show containers
run: docker ps -a
- name: Get log from cc-nginx
run: docker logs cc-nginx
- name: Get log from cc-redis
run: docker logs cc-redis
- name: Get log from cc-db
run: docker logs cc-db
- name: Attempt to curl localhost:80/login
run: |
chmod +x ./.github/accessTest.sh
./.github/accessTest.sh
- name: Get log from cc-php
run: docker logs cc-php
- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.yml" down