diff --git a/gitea_act_runner/Dockerfile b/gitea_act_runner/Dockerfile index 08680bc..76263e4 100644 --- a/gitea_act_runner/Dockerfile +++ b/gitea_act_runner/Dockerfile @@ -11,8 +11,9 @@ ARG \ RUN apk add --no-cache git docker-cli python3 py3-pip && \ curl -s https://raw.githubusercontent.com/nektos/act/master/install.sh | bash -# Install Ansible via pip -RUN pip3 install --no-cache-dir ansible +# Create a directory for the virtual environment and install Ansible inside it +RUN python3 -m venv /opt/ansible-venv && \ + /opt/ansible-venv/bin/pip install --no-cache-dir ansible # Optional: Additional steps for SSH/GitHub authentication or configuration diff --git a/gitea_act_runner/run.sh b/gitea_act_runner/run.sh index a7932de..9bf70b3 100644 --- a/gitea_act_runner/run.sh +++ b/gitea_act_runner/run.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Activate the Ansible virtual environment +source /opt/ansible-venv/bin/activate + # Load configuration from Home Assistant GITEA_URL=$(bashio::config 'gitea_url') GITEA_TOKEN=$(bashio::config 'gitea_token')