Verbessere die Validierung der Umgebungsvariablen im Produktions-Deployment
Some checks failed
Deploy production / deploy (push) Failing after 1s
Some checks failed
Deploy production / deploy (push) Failing after 1s
This commit is contained in:
@@ -15,17 +15,15 @@ jobs:
|
||||
DEPLOY_USER: ${{ secrets.TIMECLOCK_DEPLOY_USER }}
|
||||
DEPLOY_SSH_PRIVATE_KEY: ${{ secrets.TIMECLOCK_DEPLOY_SSH_PRIVATE_KEY }}
|
||||
DEPLOY_SSH_KNOWN_HOSTS: ${{ secrets.TIMECLOCK_DEPLOY_SSH_KNOWN_HOSTS }}
|
||||
echo "$DEPLOY_HOST"
|
||||
echo "$DEPLOY_USER"
|
||||
echo "$DEPLOY_SSH_PRIVATE_KEY"
|
||||
echo "$DEPLOY_SSH_KNOWN_HOSTS"
|
||||
run: |
|
||||
set -eu
|
||||
|
||||
test -n "$DEPLOY_HOST"
|
||||
test -n "$DEPLOY_USER"
|
||||
test -n "$DEPLOY_SSH_PRIVATE_KEY"
|
||||
test -n "$DEPLOY_SSH_KNOWN_HOSTS"
|
||||
test -n "$DEPLOY_HOST" || { echo "TIMECLOCK_DEPLOY_HOST fehlt"; exit 1; }
|
||||
test -n "$DEPLOY_USER" || { echo "TIMECLOCK_DEPLOY_USER fehlt"; exit 1; }
|
||||
test -n "$DEPLOY_SSH_PRIVATE_KEY" || { echo "TIMECLOCK_DEPLOY_SSH_PRIVATE_KEY fehlt"; exit 1; }
|
||||
test -n "$DEPLOY_SSH_KNOWN_HOSTS" || { echo "TIMECLOCK_DEPLOY_SSH_KNOWN_HOSTS fehlt"; exit 1; }
|
||||
|
||||
echo "Verbinde zu $DEPLOY_USER@$DEPLOY_HOST …"
|
||||
|
||||
install -d -m 700 "$HOME/.ssh"
|
||||
printf '%s\n' "$DEPLOY_SSH_PRIVATE_KEY" > "$HOME/.ssh/id_ed25519"
|
||||
|
||||
Reference in New Issue
Block a user