All checks were successful
Docker Build (PR) / Build Docker image (pull_request) Successful in 2m21s
49 lines
1.2 KiB
YAML
49 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
|
|
if: ${{ !contains(github.event.pull_request.title, '[skip-ci]') }}
|
|
|
|
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 }}
|