Fix docker caching and correcting version in Gitea workflow
build / build-linux-amd64 (push) Successful in 1m56s

This commit is contained in:
2026-05-25 00:07:15 +02:00
parent 8fa1b3e609
commit bc61ec6046
5 changed files with 63 additions and 71 deletions
+25 -23
View File
@@ -1,39 +1,41 @@
# Builds a minimal debian image that installs the hbbs/hbbr/utils .deb from a
# Gitea Actions artifact and runs it. Both services share the same image; only
# the entrypoint command differs.
# Builds a minimal debian image that, on every container start, pulls the
# hbbs/hbbr/utils .deb from a Gitea Actions artifact and installs it before
# launching the binary. Both services share the same image; only the command
# differs.
#
# Settings below are baked in as defaults. To override a value without editing
# this file, export it in your shell or put it in .env, e.g.:
# RUSTDESK_DOMAIN=rd.example.com docker compose up -d
#
# To pin a specific artifact zip (skip API auto-discovery), set ARTIFACT_URL:
# The .deb is fetched at runtime (not build time), so `docker compose up`
# always picks up the newest successful run on $GITEA_BRANCH. To pin a
# specific zip and skip auto-discovery, set ARTIFACT_URL in your shell or
# .env, e.g.:
# ARTIFACT_URL=https://gitea.cstudio.ch/mike/rustdesk-server/actions/runs/173/artifacts/rustdesk-server-linux-amd64-1e961cdd929f7af97148b76d9de79998a89402a3 \
# docker compose build
# docker compose up -d
#
networks:
rustdesk-net:
external: false
# Build args — passed to docker/Dockerfile.deb. ARTIFACT_URL, if set, short-
# circuits the API discovery and downloads the zip directly.
# The image only needs to bundle curl/jq/unzip/tini/dpkg + the fetch scripts —
# no build args required. The actual .deb download happens at container start
# (see docker/entrypoint.sh), driven by the env vars in x-rustdesk-env below.
x-rustdesk-build: &rustdesk-build
context: ./docker
dockerfile: Dockerfile.deb
args:
GITEA_URL: "${GITEA_URL:-https://gitea.cstudio.ch}"
GITEA_OWNER: "${GITEA_OWNER:-mike}"
GITEA_REPO: "${GITEA_REPO:-rustdesk-server}"
GITEA_BRANCH: "${GITEA_BRANCH:-pro-features}"
ARTIFACT_URL: "${ARTIFACT_URL:-}"
CACHE_BUST: "${CACHE_BUST:-0}"
# Runtime env that hbbs/hbbr actually read. Most settings (relay, bootstrap
# admin, key, http port) are passed via CLI flags below — the binary's
# env-var convention transforms `--foo-bar` into `FOO-BAR` (literal dashes,
# uppercase), which is awkward in YAML, so flags are clearer. The names
# below are the few that the binary reads as plain env vars.
# Runtime env. Two groups:
# 1) Artifact-fetch config consumed by entrypoint.sh on every container
# start — set ARTIFACT_URL to pin a specific zip, otherwise the script
# picks the newest successful run on $GITEA_BRANCH.
# 2) hbbs/hbbr knobs. Most settings (relay, bootstrap admin, key, http
# port) are passed via CLI flags below — the binary's env-var
# convention transforms `--foo-bar` into `FOO-BAR` (literal dashes,
# uppercase), which is awkward in YAML, so flags are clearer.
x-rustdesk-env: &rustdesk-env
GITEA_URL: "${GITEA_URL:-https://gitea.cstudio.ch}"
GITEA_OWNER: "${GITEA_OWNER:-mike}"
GITEA_REPO: "${GITEA_REPO:-rustdesk-server}"
GITEA_BRANCH: "${GITEA_BRANCH:-pro-features}"
ARTIFACT_URL: "${ARTIFACT_URL:-}"
RUST_LOG: "${RUST_LOG:-info}"
# Force relay for all sessions even on LAN. Uncomment to enable.
# ALWAYS_USE_RELAY: "Y"