Update ci.yml #8
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 Build and Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build Docker image | |
run: docker build -t my-organize-app . | |
- name: Run Docker container | |
run: docker run -d -p 23234:23234 --name organize-app my-organize-app | |
- name: Wait for Docker container to start | |
run: sleep 10 | |
- name: Clean up | |
run: docker stop organize-app && docker rm organize-app |