diff --git a/.github/workflows/docker-build-ci.yml b/.github/workflows/docker-build-ci.yml new file mode 100644 index 00000000..50788506 --- /dev/null +++ b/.github/workflows/docker-build-ci.yml @@ -0,0 +1,34 @@ +name: Build Docker Image and Docker Compose + +on: + push: + branches: + - main + - develop + pull_request: + branches: + - main + - develop + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Docker + uses: docker/setup-buildx-action@v1 + + - name: Build Docker Image + run: | + cd src/TechLanches + docker build -t techlanches-image:latest . --no-cache + + - name: Run Docker Compose Build + run: docker-compose -f docker-compose.yml build --no-cache + + - name: Clean up + run: docker system prune -af