Merge pull request #135 from ECE444-2023Fall/dev-hp-fix-event-desc #177
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkoutcode | |
uses: actions/checkout@v3 | |
- name: Build docker with new method | |
uses: isbang/[email protected] | |
with: | |
compose-file: "docker-compose.yml" | |
down-flags: "--volumes" | |
services: | | |
elasticsearch | |
web | |
- name: Check the website status | |
run: | | |
ls -a | |
echo "Sleeping for 60 seconds" | |
sleep 60 | |
docker ps -a | |
if curl -s http://localhost:5000/ | grep "Welcome!" | |
then | |
echo "Welcome message detected. PR can to merge!" | |
else | |
echo "Welcome message not detected. PR can't merge!" | |
exit 1 | |
fi | |