From 1ce54c9c24eac7958d767a5e4116ec464a86f16f Mon Sep 17 00:00:00 2001 From: Gabriel Lima Gomes <32204447+gabriellima09@users.noreply.github.com> Date: Mon, 16 Oct 2023 17:26:18 -0300 Subject: [PATCH] Create docker-build-ci.yml --- .github/workflows/docker-build-ci.yml | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/docker-build-ci.yml 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