mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
The runner's system python is marked externally managed, so installing the build requirements into it fails with PEP 668 and the pre-build never reaches bdist_wheel. A venv outside the tree gets a writable interpreter; .dockerignore admits only dist/, so nothing about the image context changes.
33 lines
1.3 KiB
YAML
33 lines
1.3 KiB
YAML
# Publishes ghcr.io/hanzoai/sentry — the Hanzo-branded image self-hosted/Dockerfile
|
|
# builds from this source, installing the wheel produced here (COPY /dist/*.whl).
|
|
#
|
|
# dist/ has to be populated before buildx starts, which is what pre-build-command
|
|
# does. setup.py's build command runs build_assets (webpack), so node_modules must
|
|
# exist before bdist_wheel; requirements-frozen.txt is the curated pin set the
|
|
# image installs, so it is copied rather than re-derived from the build venv.
|
|
# The wheel is built in a venv because the runner's system python is marked
|
|
# externally managed (PEP 668) and refuses installs.
|
|
name: docker
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ['v*']
|
|
workflow_dispatch:
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
jobs:
|
|
docker:
|
|
uses: hanzoai/.github/.github/workflows/docker-build.yml@main
|
|
with:
|
|
image: ghcr.io/hanzoai/sentry
|
|
dockerfile: self-hosted/Dockerfile
|
|
pre-build-command: |
|
|
command -v yarn >/dev/null || npm install -g [email protected]
|
|
python3 -m venv /tmp/wheel-venv
|
|
/tmp/wheel-venv/bin/pip install --quiet wheel setuptools
|
|
yarn install --frozen-lockfile
|
|
/tmp/wheel-venv/bin/python setup.py bdist_wheel --build-number 0
|
|
cp requirements-frozen.txt dist/
|
|
secrets: inherit
|