forge
Explore
Log in

Don't you dare go Hollow

hezarfen_rule_based_chatbot

Clone
★ 0

0 watching0 forksPython1.2 MiBa039b60Ahmet Kaan Gümüş2 months ago64 commits

main.yml476 lines, 21.8 KiBHistoryRawDownload
1# VPS deploy, compose-style, frontend ile aynı şekil (hata toparlama ucuz olsun):
2#
3# Validate — katalog doğrulaması + derleme kontrolü, kendi runner'ında.
4# Build and test — unittest süiti (regresyon eşikleri içinde), sonra repo
5# Containerfile'ından imaj (ENV bloğu dağıtım
6# varsayılanlarının TEK kaynağıdır) ve imaj tarball'ı +
7# compose dosyaları koşunun artefaktı olarak yüklenir.
8# Deploy — SSH: imajı yükle, deploy sahipli stack.env'in
9# HEZARFEN_TAG'ini ona çevir, compose.yaml + unit'i kur,
10# stack'i yeniden başlat, köprünün backend'e KAYIT
11# olduğunu loglardan doğrula, olmazsa önceki tag'e dön,
12# ardından bağımsız doğrulama.
13#
14# Validate ile Build and test paralel koşar; Deploy ikisi de yeşilse çalışır.
15# Yeni bir push aynı ref'teki Validate/Build'i iptal eder; uçuştaki Deploy'u
16# ASLA iptal etmez (iki deploy iç içe geçerse stack karışır).
17#
18# Bölünmenin amacı toparlama hikâyesi:
19# * Deploy adımı düşen bir koşuda "Re-run failed jobs" SADECE ~1 dakikalık
20# deploy işini yeniden koşar — imaj hâlâ koşunun artefaktında.
21# * workflow_dispatch (Actions → Run workflow, ya da
22# `gh workflow run main.yml --ref main`) süiti koşmadan en yeni yeşil
23# build'in artefaktını deploy eder.
24#
25# Bir seferlik ön koşullar (workflow'un erişimi dışında):
26# * repo secret'ları SSH_PRIVATE_KEY / SSH_HOST / SSH_USER — backend ve
27# frontend deploy'unun kullandığı üç isim;
28# * sunucuda `loginctl enable-linger <user>` (kullanıcı unit'leri için);
29# * sunucuda podman + bir compose sağlayıcı (deploy ikisini de kontrol eder);
30# * operatörün ~/hezarfen_rule_based_chatbot/hezarfen_rule_based_chatbot.env (0600) dosyası;
31# * BACKEND tarafı açık olmalı: hezarfen_backend.env içinde
32# AI_QUIC_ADDR=0.0.0.0:8090 ve AI_SHARED_TOKEN bu köprününkiyle AYNI.
33# (127.0.0.1 yazılıysa backend yalnız kendi loopback'ine bağlanır ve köprü
34# asla kayıt olamaz — deploy bunu logda görüp geri döner.)
35
36name: VPS deploy
37
38on:
39 push:
40 branches:
41 - main
42 # Elle yeniden deploy kapısı — yukarıdaki başlık yorumuna bakın.
43 workflow_dispatch:
44
45# Deploy serileştirmesi workflow'da değil deploy işinde: yeni bir push, uçuştaki
46# VPS değişimine dokunmadan bayat Validate/Build'i iptal edebilmeli.
47
48permissions:
49 contents: read
50 # workflow_dispatch yolu `gh run list/view` ile en yeni yeşil koşuyu arar ve o
51 # koşunun artefaktini indirir; ikisi de Actions API'sidir ve YAZMA GEREKMEZ.
52 actions: read
53
54env:
55 # systemd kullanıcı unit'i. Bkz. deploy/hezarfen_rule_based_chatbot_compose.service.
56 SERVICE: hezarfen_rule_based_chatbot_compose
57 # Deploy, SSH kullanıcısının home'u altındaki bu alt dizinde yaşar ($HOME
58 # sunucuda çözülür, yani kullanıcı değişince yol da onunla gelir).
59 DEPLOY_SUBDIR: hezarfen_rule_based_chatbot
60 # Köprünün ayar dosyası; deploy yalnız varlığını kontrol eder, yazmaz.
61 ENV_FILE_NAME: hezarfen_rule_based_chatbot.env
62 # Sağlık kapısı: backend'in verdiği kayıt onayı logda bu satırdır.
63 READY_MARKER: "kayıt başarılı"
64 # Köprünün backend sertifikasını çektiği yol (HTTP, backend konteynerinin portu).
65 CERT_PATH: /ai/certificate
66
67jobs:
68 validate:
69 name: Validate
70 if: github.event_name == 'push'
71 runs-on: ubuntu-24.04
72 concurrency:
73 group: ci-${{ github.workflow }}-${{ github.ref }}-validate
74 cancel-in-progress: true
75 steps:
76 - name: Checkout
77 uses: actions/checkout@v4
78 - name: Set up Python
79 uses: actions/setup-python@v5
80 with:
81 # Containerfile ile aynı satır (python:3.13-slim).
82 python-version: "3.13"
83 - name: Install dependencies
84 run: pip install --requirement requirements.txt
85 - name: Compile every module
86 run: python -m compileall -q src tests
87 - name: Validate the catalog
88 run: python -m src.main --validate
89
90 build:
91 name: Build and test
92 # Pushes only: elle yeniden deploy süiti tekrar ödemek yerine en yeni yeşil
93 # artefaktı kullanır.
94 if: github.event_name == 'push'
95 concurrency:
96 group: ci-${{ github.workflow }}-${{ github.ref }}-build
97 cancel-in-progress: true
98 runs-on: ubuntu-24.04
99 steps:
100 - name: Checkout
101 uses: actions/checkout@v4
102 - name: Set up Python
103 uses: actions/setup-python@v5
104 with:
105 python-version: "3.13"
106 - name: Install dependencies
107 run: pip install --requirement requirements.txt
108
109 # Bozuk bir build sunucuya ASLA ulaşmamalı: regresyon eşikleri
110 # (macro-F1 ≥ 0.80, OOS recall ≥ 0.70, kapsama ≥ 0.95, gizlilik recall
111 # = 1.0, kural precision = 1.0) bu süitin içinde yaşar.
112 - name: Test
113 run: python -m unittest discover -s tests -t . -v
114
115 # Laptop ve CI aynı Containerfile'ı kullanır: ENV bloğu ne diyorsa o
116 # gönderilir, ayrı bir CI ikizi yok.
117 - name: Build the image
118 run: |
119 set -euo pipefail
120 docker build -f Containerfile -t localhost/hezarfen_rule_based_chatbot:$GITHUB_SHA .
121
122 - name: Stage the release bundle
123 run: |
124 set -euo pipefail
125 mkdir -p stage
126 docker save localhost/hezarfen_rule_based_chatbot:$GITHUB_SHA | gzip > stage/hezarfen_rule_based_chatbot.tar.gz
127 cp compose.yaml deploy/hezarfen_rule_based_chatbot_compose.service stage/
128 echo -n "$GITHUB_SHA" > stage/tag
129 # Sunucuda kurulacak her şey burada olmalı; eksik parça burada,
130 # sunucuda değil, patlar.
131 test -f stage/hezarfen_rule_based_chatbot.tar.gz
132 test -f stage/compose.yaml
133 test -f stage/hezarfen_rule_based_chatbot_compose.service
134 test -f stage/tag
135 ls -l stage
136
137 # Deploy işi (ve elle yeniden deploy) bunu tüketir. 30 gün, dispatch
138 # kapısının geri uzanma penceresidir.
139 - name: Upload the release
140 uses: actions/upload-artifact@v4
141 with:
142 name: release
143 path: stage
144 retention-days: 30
145
146 deploy:
147 name: Deploy
148 needs: [validate, build]
149 concurrency:
150 group: deploy
151 cancel-in-progress: false
152 # Push: yalnız validate VE build yeşilse — ikisi de sunucuyu kapılar.
153 # Dispatch: iki CI işi bilerek atlanır (if'lerine bakın) ve `always()`
154 # bu atlamanın bu kapıyı geçmesini engeller.
155 if: >-
156 always() &&
157 ((needs.validate.result == 'success' && needs.build.result == 'success') ||
158 (github.event_name == 'workflow_dispatch' &&
159 needs.validate.result == 'skipped' &&
160 needs.build.result == 'skipped'))
161 runs-on: ubuntu-24.04
162 steps:
163 # Push deploy'u bu koşunun ürettiği ve kapıladığı sürümü alır.
164 - name: Fetch this run's release
165 if: github.event_name == 'push'
166 uses: actions/download-artifact@v4
167 with:
168 name: release
169 path: stage
170
171 # Elle yeniden deploy, BUILD işi yeşil olan en yeni koşuyu alır — en yeni
172 # tamamen yeşil koşuyu değil: bir koşu sağlık kapısında düşmüş olabilir
173 # ama build'i tam da geri almak istediğimiz sürümdür.
174 - name: Find the newest green build
175 if: github.event_name == 'workflow_dispatch'
176 env:
177 GH_TOKEN: ${{ github.token }}
178 run: |
179 set -euo pipefail
180 run_id=""
181 for rid in $(gh run list -R "$GITHUB_REPOSITORY" --workflow main.yml --branch main --event push --limit 15 --json databaseId --jq '.[].databaseId'); do
182 if [ "$(gh run view -R "$GITHUB_REPOSITORY" "$rid" --json jobs --jq '.jobs[] | select(.name=="Build and test") | .conclusion')" = "success" ]; then
183 run_id=$rid
184 break
185 fi
186 done
187 if [ -z "$run_id" ]; then
188 echo 'no run on main has a green Build-and-test job (or its artifact has expired)' >&2
189 exit 1
190 fi
191 echo "redeploying the release from run $run_id"
192 echo "run_id=$run_id" >> "$GITHUB_ENV"
193
194 - name: Fetch the green release
195 if: github.event_name == 'workflow_dispatch'
196 uses: actions/download-artifact@v4
197 with:
198 name: release
199 path: stage
200 run-id: ${{ env.run_id }}
201 github-token: ${{ github.token }}
202
203 # Dispatch yolu günler öncesine ait bir artefakt indirebilir; sunucuya
204 # dokunmadan önce paketin bütün olduğunu yeniden kontrol et.
205 - name: Check the release is complete
206 run: |
207 set -euo pipefail
208 test -f stage/hezarfen_rule_based_chatbot.tar.gz
209 test -f stage/compose.yaml
210 test -f stage/hezarfen_rule_based_chatbot_compose.service
211 test -f stage/tag
212
213 - name: Install SSH keys
214 run: |
215 mkdir -p ~/.ssh
216 echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
217 ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
218
219 - name: Upload the release
220 run: |
221 set -euo pipefail
222 ssh_target="${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}"
223
224 # Sunucunun login shell'i bash değil, ssh bu betiği ona verirdi;
225 # `bash -s` betiği stdin'den alır, login shell yalnız tek düz komut
226 # görür.
227 ssh "$ssh_target" "bash -se -- '$DEPLOY_SUBDIR'" <<'REMOTE'
228 set -euo pipefail
229 case "$1" in
230 ''|/*|*..*)
231 echo "Refusing a broad deploy subdirectory: '$1'" >&2
232 exit 1
233 ;;
234 esac
235 deploy_path=$HOME/$1
236 # Bu dizin operatörün hezarfen_rule_based_chatbot.env dosyasını, compose
237 # dosyalarını ve tag dosyalarını tutar; hiçbiri toptan silinmez.
238 mkdir -p -- "$deploy_path"
239 REMOTE
240 # stdin paketi taşıyor, betik taşıyamaz; çıkarma yine bash -c ile
241 # çünkü login shell bash değil ve $HOME'u genişletmez. Sunucuya
242 # yalnız dört deploy dosyası kurulur.
243 tar -C stage -czf - hezarfen_rule_based_chatbot.tar.gz compose.yaml hezarfen_rule_based_chatbot_compose.service tag | ssh "$ssh_target" "bash -c 'exec tar -xzf - -C \"\$HOME/\$1\"' -- '$DEPLOY_SUBDIR'"
244
245 - name: Load the image and restart the bridge
246 run: |
247 set -euo pipefail
248 ssh_target="${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}"
249
250 # bash -s, yukarıdakiyle aynı sebeple: login shell bu betiği asla
251 # görmemeli.
252 ssh "$ssh_target" "bash -se -- '$DEPLOY_SUBDIR' '$SERVICE' '$ENV_FILE_NAME' '$CERT_PATH' '$READY_MARKER'" <<'REMOTE'
253 set -euo pipefail
254 deploy_path=$HOME/$1
255 service=$2
256 env_file=$deploy_path/$3
257 cert_path=$4
258 ready_marker=$5
259 export XDG_RUNTIME_DIR=/run/user/$(id -u)
260 # compose.yaml çalışma dizininden çözülür: unit'in ExecStart'ı
261 # WorkingDirectory taşır ama rollback'in compose up'ı ve ilk deploy'un
262 # down'ı tam buradan koşar.
263 cd -- "$deploy_path"
264
265 # Hiçbir şey oynamadan önce oku: ayar dosyası operatörün, sunucuda,
266 # elle bir kez yazılır (anahtarlar için bkz.
267 # deploy/hezarfen_rule_based_chatbot.env.example). Deploy onu asla oluşturmaz,
268 # ezmez.
269 if [ ! -f "$env_file" ]; then
270 echo "missing $env_file — create it (0600) from deploy/hezarfen_rule_based_chatbot.env.example" >&2
271 exit 1
272 fi
273 chmod 0600 -- "$env_file"
274
275 # OPERATÖR ORTAMI SÜRECE ALINIR. podman-compose interpolasyonu ORTAM
276 # DEĞİŞKENLERİNE bakar ve `--env-file` YALNIZ SON dosyayı çözer
277 # (podman_compose.py:2941-2946, :2559): iki dosyalı çağrı operatör
278 # dosyasını tamamen düşürürdü, yani `${HEZARFEN_NET:-...}`
279 # interpolasyonu sessizce compose varsayılanına düşerdi. Bu yüzden
280 # dosya satır satır okunur -- kabuk genişletmesi YOK (değer içindeki
281 # `$` olduğu gibi kalır), biçim düz KEY=value olduğu için tırnak/
282 # `export` aranmaz. systemd `EnvironmentFile=` ile AYNI kurallar.
283 while IFS= read -r satir || [ -n "$satir" ]; do
284 case "$satir" in ''|'#'*) continue ;; esac
285 anahtar=${satir%%=*}
286 deger=${satir#*=}
287 case "$anahtar" in
288 ''|*[!A-Za-z0-9_]*)
289 echo "operator env: geçersiz anahtar adı -- harf/rakam/alt çizgi beklenirdi" >&2
290 exit 1
291 ;;
292 esac
293 export "$anahtar=$deger"
294 done < "$env_file"
295
296 # Rootless podman + compose sağlayıcı; üç adım sonra çıplak
297 # command-not-found yerine çözümü söyle.
298 command -v podman >/dev/null || {
299 echo "podman not found — install podman and a compose provider (e.g. dnf install podman podman-compose)" >&2
300 exit 1
301 }
302 podman compose version >/dev/null 2>&1 || {
303 echo "'podman compose' unavailable — install a compose provider (podman-compose or docker-compose)" >&2
304 exit 1
305 }
306
307 # Ön koşul: backend köprüsü açık olmalı (AI_QUIC_ADDR=0.0.0.0:8090) —
308 # sertifika ucu bunun kanıtı ve köprü ona her bağlanmada ihtiyaç duyar.
309 served_cert=$(curl -fsS "http://127.0.0.1:7656$cert_path" 2>/dev/null) || true
310 case "$served_cert" in
311 *certificate_pem*) ;;
312 *)
313 echo "backend $cert_path did not answer with a certificate — is the AI bridge enabled (AI_QUIC_ADDR=0.0.0.0:8090)?" >&2
314 exit 1
315 ;;
316 esac
317
318 # BU build'in imajını yükle ve build'in damgaladığı tag'i oku
319 # (build zamanı ile deploy zamanı neyin gittiğinde anlaşmalı).
320 gunzip -c "$deploy_path/hezarfen_rule_based_chatbot.tar.gz" | podman load
321 tag=$(cat -- "$deploy_path/tag")
322
323 # Tag rotasyonu: previous_tag geri dönüş hedefidir (ilk deploy'da
324 # yok); current_tag şu an çalışması gerekeni kaydeder.
325 if [ -f "$deploy_path/current_tag" ]; then
326 cp -- "$deploy_path/current_tag" "$deploy_path/previous_tag"
327 fi
328 printf '%s\n' "$tag" > "$deploy_path/current_tag"
329
330 # stack.env deploy sahipli (operatörün ayar dosyasından farklı):
331 # yalnız imaj tag'ini taşır ve compose'a giden TEK `--env-file` odur
332 # -- operatör değerleri yukarıda sürece alındı (systemd
333 # `EnvironmentFile=` ile aynı iki-kanal deseni). İki dosyalı çağrı bu
334 # sağlayıcıda operatör dosyasını düşürür (podman_compose.py:2941-2946,
335 # :2559); ortam değişkeni --env-file değerlerini ezer (:2562).
336 printf 'HEZARFEN_TAG=%s\n' "$tag" > "$deploy_path/stack.env"
337
338 # Konteynere DOKUNMADAN önce compose modeli çözülebiliyor mu: iki
339 # `--env-file`ı tek değer sanan sağlayıcılar (podman-compose 1.6) ya da
340 # okunamayan bir compose dosyası, unit restart edildikten SONRA değil
341 # burada, eski konteyner hâlâ ayaktayken patlasın. Çözülen model
342 # aşağıdaki kapı için saklanır.
343 rendered=$(podman compose --env-file "$deploy_path/stack.env" config) || {
344 echo "the compose model does not resolve — check the env files and the provider, nothing was changed" >&2
345 exit 1
346 }
347
348 chmod 0644 -- "$deploy_path/compose.yaml" "$deploy_path/hezarfen_rule_based_chatbot_compose.service"
349 # İmaj tarball'ı yalnız taşıyıcıydı; imaj artık podman deposunda.
350 rm -f -- "$deploy_path/hezarfen_rule_based_chatbot.tar.gz"
351
352 compose_up() {
353 podman compose --env-file "$deploy_path/stack.env" up -d --no-build
354 }
355 rollback() {
356 if [ -f "$deploy_path/previous_tag" ]; then
357 prev=$(cat -- "$deploy_path/previous_tag")
358 printf 'HEZARFEN_TAG=%s\n' "$prev" > "$deploy_path/stack.env"
359 printf '%s\n' "$prev" > "$deploy_path/current_tag"
360 compose_up
361 echo "rolled back to $prev" >&2
362 else
363 # İlk deploy: geri dönülecek bir şey yok, yarı ayakta stack'i
364 # durdur. Düz down — köprü durumsuzdur. Geri dönüş de AYNI kanalı
365 # kullanır: aynı şekilde ölen bir rollback eski tag'i bırakırdı.
366 podman compose --env-file "$deploy_path/stack.env" down
367 echo 'first deploy failed; stack stopped' >&2
368 fi
369 }
370
371 # Unit sürümle birlikte gelir: yeni kurulmuş bir kutuda ilk deploy'a
372 # kadar unit yoktur ve değişen unit onu gerektiren compose ile iner.
373 mkdir -p -- "$HOME/.config/systemd/user"
374 install -m 0644 -- "$deploy_path/hezarfen_rule_based_chatbot_compose.service" "$HOME/.config/systemd/user/$service.service"
375 systemctl --user daemon-reload
376
377 # Unit RemainAfterExit'li bir oneshot: aktif (exited) unit'te `start`
378 # no-op olurdu — her deploy ExecStart'ı yeniden koşmak için restart
379 # eder. Düşen bir restart (kötü interpolasyon, sağlayıcı aksaklığı)
380 # yine de aşağıdaki sağlık kapısına ulaşmalı: kararı o verir.
381 systemctl --user enable -- "$service"
382 systemctl --user restart "$service" || true
383
384 # Köprünün HAZIR olması = backend'in kaydı kabul etmesi. Portu yok,
385 # o yüzden kapı logdadır: backend'in greeting'i 'kayıt başarılı' satırını
386 # yazdırır. 60 deneme, çünkü sertifika + QUIC el sıkışması ve olası
387 # yeniden bağlanma aralıkları zaman alır.
388 ready_ok=0
389 for _ in $(seq 1 60); do
390 if podman logs --tail 200 hezarfen_rule_based_chatbot 2>&1 | grep -q "$ready_marker"; then
391 ready_ok=1
392 break
393 fi
394 sleep 1
395 done
396 if [ "$ready_ok" -ne 1 ]; then
397 echo "the bridge never registered with the backend ('$ready_marker' missing); rolling back" >&2
398 podman logs --tail 30 hezarfen_rule_based_chatbot 2>&1 >&2 || true
399 rollback
400 exit 1
401 fi
402
403 # Eski bir stack de cevap verebilir; çalışan konteyner BU build'in
404 # imajı olmalı, yoksa geri dönülür.
405 image=$(podman inspect -f '{{.Config.Image}}' hezarfen_rule_based_chatbot)
406 case "$image" in
407 *"$tag"*) ;;
408 *)
409 echo "the bridge registered, but the container runs '$image' — not this build ($tag); rolling back" >&2
410 rollback
411 exit 1
412 ;;
413 esac
414
415 # KAPI 3 — OPERATÖR DEĞİŞKENLERİ GEÇERLİ Mİ. Bu iddia olmadan iki
416 # dosyalı `--env-file` sınıfı sessizce geri gelebilir: `up` ya
417 # reddeder ya da (varsayılanı olan anahtarlarda) konteyneri SESSİZCE
418 # compose varsayılanıyla ayağa kaldırırdı. İki kanal, iki iddia:
419 # AI_SHARED_TOKEN konteynerde -> operatör dosyası konteynere ulaştı
420 # (`env_file:` kanalı)
421 # çözülen model operatörün ağ adını taşıyor -> `HEZARFEN_NET`
422 # İNTERPOLASYONA girdi (iki dosyalı
423 # çağrı tam olarak bunu düşürürdü)
424 # Sır DEĞERLERİ loglanmaz: yalnız varlık ve interpolasyon ölçülür.
425 eksik=0
426 if ! podman inspect -f '{{range .Config.Env}}{{println .}}{{end}}' hezarfen_rule_based_chatbot \
427 | grep -qE '^AI_SHARED_TOKEN=.'; then
428 echo "container env: AI_SHARED_TOKEN yok ya da BOŞ — operatör dosyası compose'a ulaşmamış" >&2
429 eksik=1
430 fi
431 op_net=$(sed -n 's/^HEZARFEN_NET=//p' "$env_file" | tail -1)
432 [ -n "$op_net" ] || op_net='hezarfen_backend_default'
433 if ! printf '%s\n' "$rendered" | grep -qF -- "$op_net"; then
434 echo "compose modeli operatörün ağ adını ($op_net) taşımıyor — HEZARFEN_NET interpolasyona girmemiş" >&2
435 eksik=1
436 fi
437 if [ "$eksik" -ne 0 ]; then
438 echo "operator env did not reach the compose model — check $env_file; rolling back" >&2
439 rollback
440 exit 1
441 fi
442 echo 'hezarfen_rule_based_chatbot_compose is up'
443 REMOTE
444
445 # Bağımsız son kontrol: cevap veren konteyner hâlâ güncel tag'in olmalı ve
446 # köprü kayıtlı kalmalı.
447 - name: Verify the bridge is registered
448 run: |
449 set -euo pipefail
450 ssh_target="${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}"
451 ssh "$ssh_target" "bash -se -- '$DEPLOY_SUBDIR' '$READY_MARKER'" <<'REMOTE'
452 set -euo pipefail
453 deploy_path=$HOME/$1
454 ready_marker=$2
455 export XDG_RUNTIME_DIR=/run/user/$(id -u)
456 cd -- "$deploy_path"
457 tag=$(cat -- "$deploy_path/current_tag")
458 image=$(podman inspect -f '{{.Config.Image}}' hezarfen_rule_based_chatbot)
459 case "$image" in
460 *"$tag"*) ;;
461 *)
462 echo "container runs '$image', not the current tag '$tag'" >&2
463 exit 1
464 ;;
465 esac
466 status=$(podman inspect -f '{{.State.Status}}' hezarfen_rule_based_chatbot)
467 [ "$status" = "running" ] || { echo "container status is '$status', not running" >&2; exit 1; }
468 podman logs --tail 200 hezarfen_rule_based_chatbot 2>&1 | grep -q "$ready_marker" || {
469 echo "the bridge is not registered with the backend" >&2
470 exit 1
471 }
472 echo 'bridge registered, container is this build'
473 REMOTE
474
475 - name: Cleaning
476 run: rm -rf ~/.ssh