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: Build and run docker container | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build the Docker image | |
run: sudo docker build . --file Dockerfile --tag backend | |
- name: Run the Docker container on port 8000 | |
run: sudo docker run -d -p 8000:8000 backend |