Skip to content

Optimize PR checks #3981

Optimize PR checks

Optimize PR checks #3981

name: Docker build
on:
pull_request:
branches: [ main ]
types: [opened, synchronize, reopened]
paths:
- 'frontend/**'
- '!frontend/stats/**'
- 'backend/**'
- '.github/workflows/build-image-on-pr.yaml'
workflow_dispatch:
jobs:
docker-build:
name: Build image
runs-on: ubuntu-latest
container:
image: docker:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v5
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max