diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 218f865..94961f7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -183,16 +183,25 @@ jobs: set -euo pipefail REMOTE_TARGET="${GCE_USER}@${GCE_INSTANCE_NAME}" - SSH_COMMON_FLAGS=( + REMOTE_COMMON_FLAGS=( --project "${GCP_PROJECT_ID}" --zone "${GCE_ZONE}" --quiet --tunnel-through-iap --ssh-key-file "${SSH_KEY_FILE}" + ) + SSH_FLAGS=( + "${REMOTE_COMMON_FLAGS[@]}" --ssh-flag="-o ServerAliveInterval=30" --ssh-flag="-o ServerAliveCountMax=10" --ssh-flag="-o TCPKeepAlive=yes" ) + SCP_FLAGS=( + "${REMOTE_COMMON_FLAGS[@]}" + --scp-flag="-o ServerAliveInterval=30" + --scp-flag="-o ServerAliveCountMax=10" + --scp-flag="-o TCPKeepAlive=yes" + ) REMOTE_SYNC_COMMAND=$(cat <