Merge pull request #106 from trails-cool/simplify-restart-all

Simplify restart-all to workflow_dispatch only
This commit is contained in:
Ullrich Schäfer 2026-03-27 19:18:42 +01:00 committed by GitHub
commit 5e564e7562
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 12 deletions

View file

@ -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)

View file

@ -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