add a test build for PRs

This commit is contained in:
2025-10-10 09:51:11 +02:00
parent 64ac7ef0ba
commit ea9c13ae91

View File

@@ -0,0 +1,35 @@
name: Docker Build (PR)
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
build-image:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
with:
fetch-depth: 0
fetch-tags: true
- name: Derive lowercase repo name
run: |
echo "REPO_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image (no push)
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: false
tags: ${{ secrets.REGISTRY }}/${{ env.REPO_NAME }}:pr-${{ github.event.number }}