Files
SemapForm/.gitea/workflows/docker-build.yml
WorldTeacher 6ea0950c66
All checks were successful
Docker Build (PR) / Build Docker image (pull_request) Successful in 2m11s
chore: add uv and python setup to test to generate requirements file
2025-11-19 14:06:20 +01:00

48 lines
1.2 KiB
YAML

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: setup uv
uses: astral-sh/setup-uv@v5
- name: Install Python
run: uv python install
with:
python-version-file: "pyproject.toml"
- name: Install project dependencies
run: |
uv sync --all-groups
uv add pip
uv export --format requirements.txt -o requirements.txt
- 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 }}