Skip to content

Commit

Permalink
Use ghcr for supervisor and builder (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Jul 18, 2023
1 parent 636f90b commit 06bb8ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addons/rootfs/usr/bin/supervisor_run
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function run_supervisor() {
-e SUPERVISOR_NAME=hassio_supervisor \
-e SUPERVISOR_DEV=1 \
-e SUPERVISOR_MACHINE="qemu${QEMU_ARCH}" \
"homeassistant/${HA_ARCH}-hassio-supervisor:${SUPERVISOR_VERSION}"
"${SUPERVISOR_IMAGE}:${SUPERVISOR_VERSION}"
}


Expand Down
11 changes: 7 additions & 4 deletions common/rootfs_supervisor/etc/supervisor_scripts/common
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

set -e

export SUPERVISOR_VERSION="$(curl -s https://version.home-assistant.io/dev.json | jq -e -r '.supervisor')"
VERSION_INFO=$(curl -s https://version.home-assistant.io/dev.json)
HA_ARCH=$(get_arch ha)
QEMU_ARCH=$(get_arch qemu)
DOCKER_TIMEOUT=30
DOCKER_PID=0
WD="${WORKSPACE_DIRECTORY:=/workspaces/supervisor}"

export SUPERVISOR_VERSION="$(echo ${VERSION_INFO} | jq -e -r '.supervisor')"
export SUPERVISOR_IMAGE="$(sed "s/{arch}/${HA_ARCH}/g" <<< "$(echo ${VERSION_INFO} | jq -e -r '.images.supervisor')")"


function start_docker() {
local starttime
Expand Down Expand Up @@ -78,13 +81,13 @@ function cleanup_lastboot() {
}

function build_supervisor() {
docker pull "homeassistant/${HA_ARCH}-builder:dev"
docker pull "ghcr.io/home-assistant/${HA_ARCH}-builder:dev"

docker run --rm \
--privileged \
-v /run/docker.sock:/run/docker.sock \
-v "$(pwd):/data" \
"homeassistant/${HA_ARCH}-builder:dev" \
"ghcr.io/home-assistant/${HA_ARCH}-builder:dev" \
--generic latest \
--target /data \
--test \
Expand Down Expand Up @@ -117,7 +120,7 @@ function run_supervisor() {
-e SUPERVISOR_NAME="hassio_supervisor" \
-e SUPERVISOR_DEV=1 \
-e SUPERVISOR_MACHINE="qemu${QEMU_ARCH}" \
"homeassistant/${HA_ARCH}-hassio-supervisor:latest"
"${SUPERVISOR_IMAGE}:latest"
}

function init_dbus() {
Expand Down

0 comments on commit 06bb8ac

Please sign in to comment.