ci(root): Add Dockerfile and docker-compose #2
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: Deploy Checks | |
on: | |
pull_request: | |
branches: [ dev ] | |
jobs: | |
deploy_preview: | |
name: Deploy Checks | |
runs-on: ubuntu-latest | |
permissions: | |
deployments: write | |
contents: read | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build Docker Compose services | |
run: docker-compose build | |
- name: Start Docker Compose services | |
run: docker-compose up -d | |
- name: List running services | |
run: docker-compose ps | |
# - name: List running containers and check if they are running | |
# run: docker ps -a --filter "status=running" --format "{{.Names}}" | grep -q "kampus" | |
- name: Shutdown Docker Compose services | |
run: docker-compose down |