Skip to content

Commit

Permalink
github: add Docker build verification workflow
Browse files Browse the repository at this point in the history
Add GitHub workflow to detect regressions in docker/dev/Dockerfile by:
- Building a container image on Dockerfile changes in PRs
- Running test suite against the built image in dev mode
- Using clang++ compiler with C++23 standard

This helps catch build issues and incompatibilities early in the
development process.

Refs scylladb#2656
Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Feb 24, 2025
1 parent 295704e commit 8d2bd15
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Verify Dockerfile Build

on:
pull_request:
paths:
- 'docker/dev/Dockerfile'
- 'install-dependencies.sh'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
build:
timeout-minutes: 20
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: |
docker/dev/Dockerfile
install-dependencies.sh
- 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/dev/Dockerfile
push: false
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 8d2bd15

Please sign in to comment.