diff --git a/.gitea/workflows/netbird-install.yml b/.gitea/workflows/netbird-install.yml index 060a45a..b8f9913 100644 --- a/.gitea/workflows/netbird-install.yml +++ b/.gitea/workflows/netbird-install.yml @@ -36,18 +36,18 @@ jobs: sudo apt-get install -y git openssh-client ansible-core python3 fi - rm -rf /tmp/homelab-infra - git clone https://gitea.gunihome.ru/karpenok/homelab-infra.git /tmp/homelab-infra + rm -rf "${HOME}/homelab-infra" + git clone https://gitea.gunihome.ru/karpenok/homelab-infra.git "${HOME}/homelab-infra" sha="${GITHUB_SHA:-${GITEA_SHA:-}}" if [ -n "${sha}" ]; then - git -C /tmp/homelab-infra checkout "${sha}" + git -C "${HOME}/homelab-infra" checkout "${sha}" fi install -d -m 700 "${HOME}/.ssh" printf '%s\n' "${RUNNER_SSH_KEY}" > "${HOME}/.ssh/id_ed25519" chmod 600 "${HOME}/.ssh/id_ed25519" - cd /tmp/homelab-infra + cd "${HOME}/homelab-infra" ansible-inventory -i inventories/prod/hosts.yml --list > /tmp/inventory.json python3 - <<'PY' import json, subprocess