Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2065446393 | ||
|
|
786e06a7a3 | ||
|
|
44e41b3dd8 | ||
|
|
f9d23ad267 | ||
|
|
582bc407be |
@@ -47,7 +47,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ./drb-edge-node
|
context: ./drb-edge-node
|
||||||
file: ./drb-edge-node/Dockerfile
|
file: ./drb-edge-node/Dockerfile
|
||||||
platforms: linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.VERSION }}
|
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.VERSION }}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ./icecast
|
context: ./icecast
|
||||||
file: ./icecast/Dockerfile
|
file: ./icecast/Dockerfile
|
||||||
platforms: linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.VERSION }}
|
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.VERSION }}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ./op25-container
|
context: ./op25-container
|
||||||
file: ./op25-container/Dockerfile
|
file: ./op25-container/Dockerfile
|
||||||
platforms: linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.VERSION }}
|
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.VERSION }}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ./secondary-sdr-container
|
context: ./secondary-sdr-container
|
||||||
file: ./secondary-sdr-container/Dockerfile
|
file: ./secondary-sdr-container/Dockerfile
|
||||||
platforms: linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.VERSION }}
|
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.VERSION }}
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ${{ matrix.context }}
|
context: ${{ matrix.context }}
|
||||||
file: ${{ matrix.file }}
|
file: ${{ matrix.file }}
|
||||||
platforms: linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ vars.PUBLIC_REGISTRY }}/${{ vars.PUBLIC_NAMESPACE }}/drb-${{ matrix.name }}:${{ steps.meta.outputs.VERSION }}
|
${{ vars.PUBLIC_REGISTRY }}/${{ vars.PUBLIC_NAMESPACE }}/drb-${{ matrix.name }}:${{ steps.meta.outputs.VERSION }}
|
||||||
|
|||||||
@@ -67,12 +67,16 @@ jobs:
|
|||||||
TAG="src-$(git rev-parse HEAD:${{ matrix.context }})"
|
TAG="src-$(git rev-parse HEAD:${{ matrix.context }})"
|
||||||
echo "IMAGE=$IMAGE" >> $GITHUB_OUTPUT
|
echo "IMAGE=$IMAGE" >> $GITHUB_OUTPUT
|
||||||
echo "TAG=$TAG" >> $GITHUB_OUTPUT
|
echo "TAG=$TAG" >> $GITHUB_OUTPUT
|
||||||
if docker buildx imagetools inspect "$IMAGE:$TAG" >/dev/null 2>&1; then
|
# Present only counts if BOTH platforms are in it: src- tags pushed
|
||||||
|
# before node-26#28 are arm64-only, and an amd64 node can't pull them.
|
||||||
|
RAW="$(docker buildx imagetools inspect --raw "$IMAGE:$TAG" 2>/dev/null | tr -d ' \n' || true)"
|
||||||
|
if printf '%s' "$RAW" | grep -q '"architecture":"amd64"' \
|
||||||
|
&& printf '%s' "$RAW" | grep -q '"architecture":"arm64"'; then
|
||||||
echo "EXISTS=true" >> $GITHUB_OUTPUT
|
echo "EXISTS=true" >> $GITHUB_OUTPUT
|
||||||
echo "$IMAGE:$TAG already published — nothing to do"
|
echo "$IMAGE:$TAG already published for amd64 + arm64 — nothing to do"
|
||||||
else
|
else
|
||||||
echo "EXISTS=false" >> $GITHUB_OUTPUT
|
echo "EXISTS=false" >> $GITHUB_OUTPUT
|
||||||
echo "$IMAGE:$TAG missing — building it"
|
echo "$IMAGE:$TAG missing or not multi-arch — building it"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- if: steps.meta.outputs.EXISTS != 'true'
|
- if: steps.meta.outputs.EXISTS != 'true'
|
||||||
@@ -80,8 +84,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ./${{ matrix.context }}
|
context: ./${{ matrix.context }}
|
||||||
file: ./${{ matrix.context }}/Dockerfile
|
file: ./${{ matrix.context }}/Dockerfile
|
||||||
# arm64 only, same as the build-*.yml workflows (node-26#28).
|
# amd64 + arm64, same as the build-*.yml workflows (node-26#28).
|
||||||
platforms: linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.IMAGE }}:${{ steps.meta.outputs.TAG }}
|
tags: ${{ steps.meta.outputs.IMAGE }}:${{ steps.meta.outputs.TAG }}
|
||||||
cache-from: type=registry,ref=${{ steps.meta.outputs.IMAGE }}:buildcache
|
cache-from: type=registry,ref=${{ steps.meta.outputs.IMAGE }}:buildcache
|
||||||
|
|||||||
@@ -74,6 +74,43 @@ class _Voice:
|
|||||||
code: Optional[str] = None
|
code: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
|
def _join_refusal(guild, channel) -> Optional[tuple[str, str]]:
|
||||||
|
"""Why Discord would refuse this bot's voice join, or None.
|
||||||
|
|
||||||
|
Discord does not answer a join the bot lacks permission for — the gateway
|
||||||
|
just never sends the voice-server update, discord.py times out after 30s,
|
||||||
|
and the admin page used to read "(TimeoutError: )". Checking first turns
|
||||||
|
that into an instruction. Best effort: if the bot's own member or the
|
||||||
|
permission data is not cached, let the join go ahead.
|
||||||
|
"""
|
||||||
|
me = getattr(guild, "me", None)
|
||||||
|
permissions_for = getattr(channel, "permissions_for", None)
|
||||||
|
if me is None or permissions_for is None:
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
perms = permissions_for(me)
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
missing = [label for attr, label in (("view_channel", "View Channel"), ("connect", "Connect"))
|
||||||
|
if not getattr(perms, attr, True)]
|
||||||
|
if getattr(channel, "type", None) == discord.ChannelType.voice and not getattr(perms, "speak", True):
|
||||||
|
missing.append("Speak")
|
||||||
|
if missing:
|
||||||
|
return ("missing_permissions",
|
||||||
|
f"The radio bot lacks {', '.join(missing)} on that voice channel — "
|
||||||
|
"allow it in the channel's permission settings in Discord.")
|
||||||
|
limit = getattr(channel, "user_limit", 0) or 0
|
||||||
|
# The bot's own lingering voice state (a dropped connection) is not a
|
||||||
|
# slot it needs; counting it would block the rejoin of a full channel.
|
||||||
|
me_id = getattr(me, "id", None)
|
||||||
|
members = [m for m in (getattr(channel, "members", None) or [])
|
||||||
|
if me_id is None or getattr(m, "id", None) != me_id]
|
||||||
|
if limit and len(members) >= limit and not getattr(perms, "move_members", False):
|
||||||
|
return ("channel_full", f"That voice channel is full ({len(members)}/{limit}) — "
|
||||||
|
"raise its user limit or free a slot.")
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def _default_client_factory():
|
def _default_client_factory():
|
||||||
intents = discord.Intents.none()
|
intents = discord.Intents.none()
|
||||||
intents.guilds = True
|
intents.guilds = True
|
||||||
@@ -220,6 +257,10 @@ class RadioManager:
|
|||||||
v.error = self._session_errors.get(d["token_id"], "The radio bot could not log in to Discord.")
|
v.error = self._session_errors.get(d["token_id"], "The radio bot could not log in to Discord.")
|
||||||
continue
|
continue
|
||||||
await self._ensure_voice(sess, v, d)
|
await self._ensure_voice(sess, v, d)
|
||||||
|
# 4) presence follows voice: "Listening to <system>" only while a
|
||||||
|
# voice connection for that bot is actually up.
|
||||||
|
for sess in list(self._sessions.values()):
|
||||||
|
await self._sync_presence(sess, target)
|
||||||
|
|
||||||
async def _ensure_session(self, token_id: str) -> Optional[_Session]:
|
async def _ensure_session(self, token_id: str) -> Optional[_Session]:
|
||||||
sess = self._sessions.get(token_id)
|
sess = self._sessions.get(token_id)
|
||||||
@@ -275,7 +316,12 @@ class RadioManager:
|
|||||||
if not vc.is_playing():
|
if not vc.is_playing():
|
||||||
self._play(v)
|
self._play(v)
|
||||||
v.state, v.error, v.code = "connected", None, None
|
v.state, v.error, v.code = "connected", None, None
|
||||||
await self._set_presence(sess, d.get("system_name"))
|
return
|
||||||
|
refusal = _join_refusal(guild, channel)
|
||||||
|
if refusal:
|
||||||
|
if v.error != refusal[1]: # once per change, not every watchdog pass
|
||||||
|
logger.error(f"Stream {v.stream_id}: {refusal[1]}")
|
||||||
|
v.state, v.code, v.error = "error", refusal[0], refusal[1]
|
||||||
return
|
return
|
||||||
v.state = "connecting"
|
v.state = "connecting"
|
||||||
try:
|
try:
|
||||||
@@ -287,11 +333,23 @@ class RadioManager:
|
|||||||
if existing is not None:
|
if existing is not None:
|
||||||
await existing.disconnect(force=True)
|
await existing.disconnect(force=True)
|
||||||
v.vc = await channel.connect()
|
v.vc = await channel.connect()
|
||||||
|
except asyncio.TimeoutError:
|
||||||
|
# discord.py's TimeoutError has no message, so the old text read
|
||||||
|
# "(TimeoutError: )" — useless on the admin page.
|
||||||
|
v.vc = None
|
||||||
|
v.state, v.code = "error", "connect_timeout"
|
||||||
|
# Permissions were checked above, so this is usually the voice
|
||||||
|
# handshake itself (e.g. a pre-2.7 discord.py refused with 4017 for
|
||||||
|
# lacking DAVE E2EE, then retried until the 30s timeout) or UDP egress.
|
||||||
|
v.error = ("Discord never completed the voice join (timed out). Permissions look fine, so "
|
||||||
|
"check the node's discord.py voice log (DAVE close 4017, UDP blocked).")
|
||||||
|
logger.error(f"Stream {v.stream_id}: voice connect timed out")
|
||||||
|
return
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
v.vc = None
|
v.vc = None
|
||||||
v.state, v.code = "error", "connect_failed"
|
v.state, v.code = "error", "connect_failed"
|
||||||
v.error = f"Could not connect to the voice channel ({type(e).__name__}: {str(e)[:120]})."
|
v.error = f"Could not connect to the voice channel ({type(e).__name__}: {str(e)[:120]})."
|
||||||
logger.error(f"Stream {v.stream_id}: voice connect failed: {e}")
|
logger.error(f"Stream {v.stream_id}: voice connect failed: {type(e).__name__}: {e}")
|
||||||
return
|
return
|
||||||
# Bounded wait for the shared PulseAudio socket (op25 container creates it).
|
# Bounded wait for the shared PulseAudio socket (op25 container creates it).
|
||||||
if not await pulse.wait_until_ready():
|
if not await pulse.wait_until_ready():
|
||||||
@@ -300,15 +358,27 @@ class RadioManager:
|
|||||||
return
|
return
|
||||||
self._play(v, pulse_checked=True)
|
self._play(v, pulse_checked=True)
|
||||||
v.state, v.error, v.code = "connected", None, None
|
v.state, v.error, v.code = "connected", None, None
|
||||||
await self._set_presence(sess, d.get("system_name"))
|
|
||||||
logger.info(f"Stream {v.stream_id} connected (bot {v.token_id})")
|
logger.info(f"Stream {v.stream_id} connected (bot {v.token_id})")
|
||||||
|
|
||||||
async def _set_presence(self, sess: _Session, name: Optional[str]) -> None:
|
async def _sync_presence(self, sess: _Session, target: dict[str, dict]) -> None:
|
||||||
if not name or sess.presence == name:
|
"""Show "Listening to <system>" only while this bot is really in voice.
|
||||||
|
|
||||||
|
It used to be set once on the first successful join and never cleared,
|
||||||
|
so a bot whose voice later dropped (or kept failing to rejoin) still
|
||||||
|
looked healthy in Discord's member list.
|
||||||
|
"""
|
||||||
|
name = None
|
||||||
|
for sid, v in sorted(self._voices.items()):
|
||||||
|
if (v.token_id == sess.token_id and v.state == "connected"
|
||||||
|
and v.vc is not None and v.vc.is_connected()):
|
||||||
|
name = (target.get(sid) or {}).get("system_name") or name
|
||||||
|
if name:
|
||||||
|
break
|
||||||
|
if sess.presence == name:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
await sess.client.change_presence(
|
activity = discord.Activity(type=discord.ActivityType.listening, name=name) if name else None
|
||||||
activity=discord.Activity(type=discord.ActivityType.listening, name=name))
|
await sess.client.change_presence(activity=activity)
|
||||||
sess.presence = name
|
sess.presence = name
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(f"Presence update failed: {e}")
|
logger.warning(f"Presence update failed: {e}")
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ uvicorn[standard]
|
|||||||
pydantic-settings
|
pydantic-settings
|
||||||
paho-mqtt>=2.0.0
|
paho-mqtt>=2.0.0
|
||||||
httpx
|
httpx
|
||||||
discord.py[voice]
|
# >=2.7: Discord requires DAVE (E2EE) voice since 2026-03-01; 2.7 is the first
|
||||||
|
# discord.py with it (the [voice] extra pulls `davey`). Older releases cannot join voice.
|
||||||
|
discord.py[voice]>=2.7
|
||||||
PyNaCl
|
PyNaCl
|
||||||
python-multipart
|
python-multipart
|
||||||
pytest
|
pytest
|
||||||
|
|||||||
@@ -47,8 +47,18 @@ class FakeVC:
|
|||||||
class FakeChannel:
|
class FakeChannel:
|
||||||
def __init__(self, guild, cid, kind=discord.ChannelType.voice):
|
def __init__(self, guild, cid, kind=discord.ChannelType.voice):
|
||||||
self.guild, self.id, self.type = guild, cid, kind
|
self.guild, self.id, self.type = guild, cid, kind
|
||||||
|
self.perms = discord.Permissions(view_channel=True, connect=True, speak=True)
|
||||||
|
self.user_limit = 0
|
||||||
|
self.members = []
|
||||||
|
self.connect_error = None
|
||||||
|
|
||||||
|
def permissions_for(self, member):
|
||||||
|
assert member is self.guild.me
|
||||||
|
return self.perms
|
||||||
|
|
||||||
async def connect(self):
|
async def connect(self):
|
||||||
|
if self.connect_error:
|
||||||
|
raise self.connect_error
|
||||||
vc = FakeVC(self)
|
vc = FakeVC(self)
|
||||||
self.guild.voice_client = vc
|
self.guild.voice_client = vc
|
||||||
return vc
|
return vc
|
||||||
@@ -57,6 +67,7 @@ class FakeChannel:
|
|||||||
class FakeGuild:
|
class FakeGuild:
|
||||||
def __init__(self, gid, channel_ids):
|
def __init__(self, gid, channel_ids):
|
||||||
self.id = gid
|
self.id = gid
|
||||||
|
self.me = object()
|
||||||
self.voice_client = None
|
self.voice_client = None
|
||||||
self.channels = {c: FakeChannel(self, c) for c in channel_ids}
|
self.channels = {c: FakeChannel(self, c) for c in channel_ids}
|
||||||
|
|
||||||
@@ -149,6 +160,7 @@ async def test_apply_connects_and_reports(env):
|
|||||||
assert env.mgr.is_connected
|
assert env.mgr.is_connected
|
||||||
vc = env.guilds[1].voice_client
|
vc = env.guilds[1].voice_client
|
||||||
assert vc.plays == 1 and vc.channel.id == 11
|
assert vc.plays == 1 and vc.channel.id == 11
|
||||||
|
assert FakeClient.instances[0].presence.name == "County"
|
||||||
|
|
||||||
|
|
||||||
async def test_one_session_serves_two_guilds(env):
|
async def test_one_session_serves_two_guilds(env):
|
||||||
@@ -258,3 +270,64 @@ async def test_no_message_content_intent_on_real_client():
|
|||||||
assert client.intents.voice_states and client.intents.guilds
|
assert client.intents.voice_states and client.intents.guilds
|
||||||
finally:
|
finally:
|
||||||
await client.close()
|
await client.close()
|
||||||
|
|
||||||
|
|
||||||
|
def _presence(client):
|
||||||
|
activity = getattr(client, "presence", None)
|
||||||
|
return activity.name if activity else None
|
||||||
|
|
||||||
|
|
||||||
|
async def test_missing_connect_permission_is_named_not_a_timeout(env):
|
||||||
|
"""Discord ignores a join the bot may not make; say which permission is missing."""
|
||||||
|
env.guilds[1].channels[11].perms = discord.Permissions(view_channel=True, speak=True)
|
||||||
|
await env.mgr.apply_desired(_desired(1, (1, 11, "t1")))
|
||||||
|
st = env.published[-1]["streams"]["1:11"]
|
||||||
|
assert st["state"] == "error" and st["code"] == "missing_permissions"
|
||||||
|
assert "Connect" in st["error"] and "View Channel" not in st["error"]
|
||||||
|
assert env.guilds[1].voice_client is None
|
||||||
|
assert _presence(FakeClient.instances[0]) is None # not "Listening to …" while out of voice
|
||||||
|
|
||||||
|
|
||||||
|
async def test_full_channel_is_reported(env):
|
||||||
|
ch = env.guilds[1].channels[11]
|
||||||
|
ch.user_limit, ch.members = 2, [object(), object()]
|
||||||
|
await env.mgr.apply_desired(_desired(1, (1, 11, "t1")))
|
||||||
|
st = env.published[-1]["streams"]["1:11"]
|
||||||
|
assert st["code"] == "channel_full" and "2/2" in st["error"]
|
||||||
|
|
||||||
|
|
||||||
|
async def test_bots_own_lingering_voice_state_does_not_fill_the_channel(env):
|
||||||
|
"""A dropped connection can leave the bot listed in the channel; that is
|
||||||
|
not a slot it needs to rejoin."""
|
||||||
|
guild = env.guilds[1]
|
||||||
|
guild.me = type("Me", (), {"id": 999})()
|
||||||
|
ch = guild.channels[11]
|
||||||
|
ch.user_limit, ch.members = 2, [object(), guild.me]
|
||||||
|
await env.mgr.apply_desired(_desired(1, (1, 11, "t1")))
|
||||||
|
assert env.published[-1]["streams"]["1:11"]["state"] == "connected"
|
||||||
|
|
||||||
|
|
||||||
|
async def test_connect_timeout_has_a_readable_error(env):
|
||||||
|
env.guilds[1].channels[11].connect_error = asyncio.TimeoutError()
|
||||||
|
await env.mgr.apply_desired(_desired(1, (1, 11, "t1")))
|
||||||
|
st = env.published[-1]["streams"]["1:11"]
|
||||||
|
assert st["state"] == "error" and st["code"] == "connect_timeout"
|
||||||
|
assert "timed out" in st["error"] and "TimeoutError: )" not in st["error"]
|
||||||
|
|
||||||
|
|
||||||
|
async def test_presence_is_cleared_when_voice_is_lost_and_rejoin_fails(env):
|
||||||
|
"""The owner saw "Listening to <system>" on a bot that was not in voice:
|
||||||
|
presence was set once on join and never cleared."""
|
||||||
|
await env.mgr.apply_desired(_desired(1, (1, 11, "t1")))
|
||||||
|
client = FakeClient.instances[0]
|
||||||
|
assert _presence(client) == "County"
|
||||||
|
env.guilds[1].voice_client.connected = False
|
||||||
|
env.guilds[1].voice_client = None
|
||||||
|
env.guilds[1].channels[11].connect_error = RuntimeError("voice handshake failed")
|
||||||
|
await env.mgr.tick()
|
||||||
|
st = env.mgr.snapshot()["streams"]["1:11"]
|
||||||
|
assert st["state"] == "error" and st["code"] == "connect_failed"
|
||||||
|
assert _presence(client) is None
|
||||||
|
env.guilds[1].channels[11].connect_error = None
|
||||||
|
await env.mgr.tick()
|
||||||
|
assert _presence(client) == "County"
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# DRB edge node — one-shot bootstrap for a clean Raspberry Pi OS (arm64).
|
# DRB edge node — one-shot bootstrap for a clean Raspberry Pi OS (arm64) or Debian (amd64).
|
||||||
#
|
#
|
||||||
# curl -fsSL https://git.vpn.cusano.net/logan/node-26/raw/tag/v1/install.sh \
|
# curl -fsSL https://git.vpn.cusano.net/logan/node-26/raw/tag/v1/install.sh \
|
||||||
# | sudo bash -s -- --node-id node-003 \
|
# | sudo bash -s -- --node-id node-003 \
|
||||||
@@ -228,8 +228,8 @@ command -v apt-get >/dev/null || die "apt-get not found — this script targets
|
|||||||
|
|
||||||
ARCH="$(dpkg --print-architecture)"
|
ARCH="$(dpkg --print-architecture)"
|
||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
arm64|aarch64) ok "arch $ARCH" ;;
|
arm64|aarch64|amd64|x86_64) ok "arch $ARCH" ;;
|
||||||
*) warn "arch is $ARCH — CI only builds linux/arm64 images. Prebuilt pull will fail; use --build." ;;
|
*) warn "arch is $ARCH — CI only builds linux/amd64 + linux/arm64 images. Prebuilt pull will fail; use --build." ;;
|
||||||
esac
|
esac
|
||||||
ok "running as root"
|
ok "running as root"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user