init home-assistant
This commit is contained in:
34
home-assistant/script/hassfest/docker/Dockerfile
Normal file
34
home-assistant/script/hassfest/docker/Dockerfile
Normal file
@@ -0,0 +1,34 @@
|
||||
# Automatically generated by hassfest.
|
||||
#
|
||||
# To update, run python3 -m script.hassfest -p docker
|
||||
FROM python:3.13-alpine
|
||||
|
||||
ENV \
|
||||
UV_SYSTEM_PYTHON=true \
|
||||
UV_EXTRA_INDEX_URL="https://wheels.home-assistant.io/musllinux-index/"
|
||||
|
||||
SHELL ["/bin/sh", "-o", "pipefail", "-c"]
|
||||
ENTRYPOINT ["/usr/src/homeassistant/script/hassfest/docker/entrypoint.sh"]
|
||||
WORKDIR "/github/workspace"
|
||||
|
||||
COPY . /usr/src/homeassistant
|
||||
|
||||
# Uv is only needed during build
|
||||
RUN --mount=from=ghcr.io/astral-sh/uv:0.5.8,source=/uv,target=/bin/uv \
|
||||
# Required for PyTurboJPEG
|
||||
apk add --no-cache libturbojpeg \
|
||||
&& uv pip install \
|
||||
--no-build \
|
||||
--no-cache \
|
||||
-c /usr/src/homeassistant/homeassistant/package_constraints.txt \
|
||||
-r /usr/src/homeassistant/requirements.txt \
|
||||
stdlib-list==0.10.0 pipdeptree==2.23.4 tqdm==4.66.5 ruff==0.8.3 \
|
||||
PyTurboJPEG==1.7.5 go2rtc-client==0.1.2 ha-ffmpeg==3.2.2 hassil==2.1.0 home-assistant-intents==2025.1.1 mutagen==1.47.0 pymicro-vad==1.0.1 pyspeex-noise==1.0.2
|
||||
|
||||
LABEL "name"="hassfest"
|
||||
LABEL "maintainer"="Home Assistant <hello@home-assistant.io>"
|
||||
|
||||
LABEL "com.github.actions.name"="hassfest"
|
||||
LABEL "com.github.actions.description"="Run hassfest to validate standalone integration repositories"
|
||||
LABEL "com.github.actions.icon"="terminal"
|
||||
LABEL "com.github.actions.color"="gray-dark"
|
||||
@@ -0,0 +1,11 @@
|
||||
# Ignore everything except the specified files
|
||||
*
|
||||
|
||||
!homeassistant/
|
||||
!requirements.txt
|
||||
!script/
|
||||
script/hassfest/docker/
|
||||
!script/hassfest/docker/entrypoint.sh
|
||||
|
||||
# Temporary files
|
||||
**/__pycache__
|
||||
30
home-assistant/script/hassfest/docker/entrypoint.sh
Executable file
30
home-assistant/script/hassfest/docker/entrypoint.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
integrations=""
|
||||
integration_path=""
|
||||
core_path_provided=false
|
||||
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--core-path=*)
|
||||
core_path_provided=true
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$core_path_provided" = false ]; then
|
||||
# Enable recursive globbing using find
|
||||
for manifest in $(find . -name "manifest.json"); do
|
||||
manifest_path=$(realpath "${manifest}")
|
||||
integrations="$integrations --integration-path ${manifest_path%/*}"
|
||||
done
|
||||
|
||||
if [ -z "$integrations" ]; then
|
||||
echo "Error: No integrations found!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
cd /usr/src/homeassistant || exit 1
|
||||
exec python3 -m script.hassfest --action validate $integrations "$@"
|
||||
Reference in New Issue
Block a user