Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,15 @@ jobs:
"$SSH_USER@$SSH_HOST" "$REMOTE_CMD" <<'REMOTE_SCRIPT'
set -euo pipefail
DEPLOY_PATH="$1"
IMAGE_TAG="$2"
# Exported, not a plain assignment: `docker compose config --images` below
# runs as a separate child process, and a compose file's `${IMAGE_TAG:-...}`
# interpolation only sees variables that are actually in that process's
# environment. A plain (non-exported) IMAGE_TAG here would make every
# `docker compose` invocation silently fall back to the compose file's
# default (`<env>-latest`) instead of the immutable tag — the guard below
# would then never match, and if it were ever bypassed, an actual deploy
# would pull/run the wrong, mutable image instead of the pinned commit.
export IMAGE_TAG="$2"
# $3 is relative (see the env comment above) — resolved against $HOME here,
# on the host itself, rather than ever hardcoding an absolute /home/<user>
# path in the workflow source. Needed as an absolute path below: `docker
Expand Down
Loading