feat: Workflow deploy und sicherer Deploy-Zugang für den Gitea-Runner, noch nicht eingerichtet (#1253, #1254, #1255)
All checks were successful
ci / pruefen (push) Successful in 3m11s
All checks were successful
ci / pruefen (push) Successful in 3m11s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmHhg7bzeoxrPsLnJ4nor4
This commit is contained in:
11
scripts/srv04-deploy/nexus-deploy
Executable file
11
scripts/srv04-deploy/nexus-deploy
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# Erzwungenes Kommando des Deploy-Schlüssels (→ #1253): Der Runner darf per SSH genau eines, nämlich eine Version nennen.
|
||||
# Liegt root-eigen unter /usr/local/sbin; der SSH-Zugang `nexus-deploy` kann es nicht ändern. Ruft per sudo nur
|
||||
# nexus-deploy-install auf, das die Version noch einmal prüft.
|
||||
set -euo pipefail
|
||||
v="${SSH_ORIGINAL_COMMAND:-}"
|
||||
if ! [[ "$v" =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(-rc[0-9]{1,3})?$ ]]; then
|
||||
echo "Aufruf: genau eine Version, zum Beispiel 0.1.33 oder 0.1.33-rc3." >&2
|
||||
exit 2
|
||||
fi
|
||||
exec sudo -n /usr/local/sbin/nexus-deploy-install "$v"
|
||||
Reference in New Issue
Block a user