Simplify restart-all: workflow_dispatch only
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) <noreply@anthropic.com>
This commit is contained in:
parent
daebb63d1e
commit
9a7ecd8911
2 changed files with 6 additions and 12 deletions
11
.github/workflows/cd-infra.yml
vendored
11
.github/workflows/cd-infra.yml
vendored
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue