From 1da0474ed181bbf5ca74e9fe5c7773a168e29032 Mon Sep 17 00:00:00 2001 From: Vishnu Narayanan Date: Wed, 12 Feb 2025 17:16:33 +0530 Subject: [PATCH] chore: add gh action to test docker builds against PRs (#10892) - Add GitHub action to test docker builds for internal/external PR's - This PR builds the image on both amd64 and arm64 runners for every PR - This also reduces the build time by 70% (50mins to 15mins) --- .github/workflows/test_docker_build.yml | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/test_docker_build.yml diff --git a/.github/workflows/test_docker_build.yml b/.github/workflows/test_docker_build.yml new file mode 100644 index 000000000..460c4ba1f --- /dev/null +++ b/.github/workflows/test_docker_build.yml @@ -0,0 +1,40 @@ +name: Test Docker Build + +on: + pull_request: + branches: + - develop + - master + workflow_dispatch: + +jobs: + test-build: + strategy: + fail-fast: false + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-latest + - platform: linux/arm64 + runner: ubuntu-22.04-arm + runs-on: ${{ matrix.runner }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build Docker image + uses: docker/build-push-action@v6 + with: + context: . + file: docker/Dockerfile + platforms: ${{ matrix.platform }} + push: false + load: false + cache-from: type=gha + cache-to: type=gha,mode=max