From 01a56e232a77dd94cb42e7018bc734875081b11c Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <124715224+DhairyaMajmudar@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:28:00 +0530 Subject: [PATCH] chore(ci): Add docker check (#383) --- .github/workflows/docker-ci.yml | 22 ++++++++++++++++++++++ apps/web/Dockerfile | 1 + 2 files changed, 23 insertions(+) create mode 100644 .github/workflows/docker-ci.yml diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml new file mode 100644 index 00000000..08ecf7ca --- /dev/null +++ b/.github/workflows/docker-ci.yml @@ -0,0 +1,22 @@ +name: Docker Check + +on: + push: + paths: + - '**Dockerfile' + pull_request: + paths: + - '**Dockerfile' +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Build Docker Image + run: | + for dir in app/*/ ; do + if [ -f "$dir/Dockerfile" ]; then + docker build -f "$dir/Dockerfile" "$dir" + fi + done diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 4fa65827..5d41ebf3 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -28,6 +28,7 @@ COPY --from=builder /app/out/full/ . COPY turbo.json turbo.json + RUN pnpm turbo build --filter=web... FROM base AS runner