From 9f41e0f3b96f30ae75f69b352e006fc62fbb0e8b Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Wed, 9 Sep 2026 08:05:04 +0300 Subject: [PATCH] deploy: chain id as a dispatch input for the miner credential path The node generates the miner auth token and TLS pin per chain under /chains//, so the mainnet cutover needs one miner deploy pointed at the new id (lair/quantus's node deploy prints it). The binary is unchanged by a chain switch; only the credentials trigger the restart. CHAIN stays the push-time default and is to be bumped after the cutover. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01CBgs2nSi4H2mdh8kD8vMX5 --- .gitea/workflows/deploy.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index e98a234..e191bb4 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -28,6 +28,9 @@ on: default: deploy type: choice options: [deploy, validate] + chain: + description: "chain id under the node's chains/ directory to take miner credentials from (overrides CHAIN); the node deploy's validate step prints it" + required: false # Never half-apply two deploys at once. (Not relied on for correctness of a # single host: the restart is checksum-gated and the binary is rsynced atomically.) @@ -179,9 +182,9 @@ jobs: umask 077 tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT - nrun sudo cat /var/lib/quantus-node/chains/${{ env.CHAIN }}/miner-auth-token \ + nrun sudo cat /var/lib/quantus-node/chains/${{ github.event.inputs.chain || env.CHAIN }}/miner-auth-token \ > "$tmp/miner-auth-token" - nrun sudo cat /var/lib/quantus-node/chains/${{ env.CHAIN }}/miner-tls-cert-sha256 \ + nrun sudo cat /var/lib/quantus-node/chains/${{ github.event.inputs.chain || env.CHAIN }}/miner-tls-cert-sha256 \ > "$tmp/miner-tls-cert-sha256" test -s "$tmp/miner-auth-token" || { echo "node auth token empty — has ${{ matrix.node }} started?" >&2; exit 1; } test -s "$tmp/miner-tls-cert-sha256" || { echo "node TLS pin empty — has ${{ matrix.node }} started?" >&2; exit 1; }