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