From 9a7ecd89112070a3920551374d6bbcc4912d4cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Fri, 27 Mar 2026 19:15:22 +0100 Subject: [PATCH] Simplify restart-all: workflow_dispatch only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove commit message [restart-all] detection — doesn't work with GitHub merge commits. Keep only the explicit workflow_dispatch input. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/cd-infra.yml | 11 ++--------- CLAUDE.md | 7 ++++--- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cd-infra.yml b/.github/workflows/cd-infra.yml index ccd8f36..021fdee 100644 --- a/.github/workflows/cd-infra.yml +++ b/.github/workflows/cd-infra.yml @@ -68,15 +68,8 @@ jobs: GHCR_TOKEN=$(grep DEPLOY_GHCR_TOKEN .env | cut -d= -f2-) echo "$GHCR_TOKEN" | docker login ghcr.io -u stigi --password-stdin 2>/dev/null || true - # Check if full restart requested via: - # - workflow_dispatch input: restart_all=true - # - commit message containing [restart-all] - RESTART_ALL="${{ github.event.inputs.restart_all }}" - if [ "$RESTART_ALL" != "true" ] && echo "${{ github.event.head_commit.message }}" | grep -q '\[restart-all\]'; then - RESTART_ALL="true" - fi - - if [ "$RESTART_ALL" = "true" ]; then + # Full restart: gh workflow run cd-infra.yml -f restart_all=true + if [ "${{ github.event.inputs.restart_all }}" = "true" ]; then docker compose --env-file .env up -d --remove-orphans else # Restart infra services (except Caddy — just reload its config) diff --git a/CLAUDE.md b/CLAUDE.md index b73a560..f50f611 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -154,9 +154,10 @@ Three separate CD workflows triggered by path: All secrets are stored in SOPS-encrypted files (`infrastructure/secrets.app.env`, `infrastructure/secrets.infra.env`). Edit with `sops infrastructure/secrets.app.env`. Only `AGE_SECRET_KEY`, `DEPLOY_SSH_KEY`, and `DEPLOY_HOST` remain as GitHub secrets. ### Full restart -To restart **all** containers (not just the ones a workflow normally touches), either: -- Add `[restart-all]` to the commit message -- Or trigger manually: `gh workflow run cd-infra.yml -f restart_all=true` +To restart **all** containers (not just the ones a workflow normally touches): +```bash +gh workflow run cd-infra.yml -f restart_all=true +``` ### Server access ```bash