diff --git a/.github/workflows/docker-validation.yml b/.github/workflows/docker-validation.yml new file mode 100644 index 000000000..cb71ac180 --- /dev/null +++ b/.github/workflows/docker-validation.yml @@ -0,0 +1,40 @@ +name: Docker Build Validation + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build-docker-images: + name: Build Docker Images + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build Backend Image + uses: docker/build-push-action@v5 + with: + context: ./backend + file: ./backend/Dockerfile + push: false + tags: secuscan-backend:latest + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Build Frontend Image + uses: docker/build-push-action@v5 + with: + context: ./frontend + file: ./frontend/Dockerfile + push: false + tags: secuscan-frontend:latest + cache-from: type=gha + cache-to: type=gha,mode=max