Skip to content

Commit

Permalink
add all possible hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
subhojit777 committed Feb 18, 2022
1 parent 9b7b2a9 commit 2fe3427
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,30 @@ fi
# Copy known hosts into the SSH config.
mkdir -p ~/.ssh && chmod 0700 ~/.ssh
cat ${GITHUB_ACTION_PATH}/known_hosts >> ~/.ssh/known_hosts
# The platform.sh project host is hardcoded.
# This can be fixed later by writing a script that is supposed to return the project hostname.
ssh-keyscan -t rsa -H git.au.platform.sh >> ~/.ssh/known_hosts

# Authenticate all possible platform.sh hosts.
# USA region.
ssh-keyscan -t rsa -H git.us.platform.sh >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -H git.us-2.platform.sh >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -H git.us-3.platform.sh >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -H git.us-4.platform.sh >> ~/.ssh/known_hosts

# Europe region.
ssh-keyscan -t rsa -H git.eu.platform.sh >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -H git.eu-2.platform.sh >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -H git.eu-3.platform.sh >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -H git.eu-4.platform.sh >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -H git.eu-5.platform.sh >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -H git.de-2.platform.sh >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -H git.fr-3.platform.sh >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -H git.fr-4.platform.sh >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -H git.uk-1.platform.sh >> ~/.ssh/known_hosts

# Australia region.
ssh-keyscan -t rsa -H git.au.platform.sh >> ~/.ssh/known_hosts

# Canada region.
ssh-keyscan -t rsa -H git.ca-1.platform.sh >> ~/.ssh/known_hosts

platform project:set-remote ${PLATFORM_PROJECT_ID}
PLATFORM_OPTS="-vv --activate --target ${GITHUB_REF_NAME}"
Expand Down

0 comments on commit 2fe3427

Please sign in to comment.