Skip to content

Commit 288c992

Browse files
committed
🔨 Logic change to allow SSH_KNOWN_HOSTS="NoStrictHostKeyChecking" logic to run
1 parent b43ee1c commit 288c992

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

‎CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# vx.x.x
2-
## Fixes
1+
# v1.1.4
2+
## Features
33
- Updated GitHub Actions action dependencies
4+
## Fixes
5+
- Logic change to allow `SSH_KNOWN_HOSTS="NoStrictHostKeyChecking"` logic to run
46

57
# v1.1.3
68
## Features

‎entrypoint.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
set -o pipefail
44

5-
65
if [ "$SSH_PRIVATE_KEY" ]; then
76
## Run ssh-agent (inside the build environment)
87
eval $(ssh-agent -s)
@@ -11,15 +10,13 @@ if [ "$SSH_PRIVATE_KEY" ]; then
1110
echo "${SSH_PRIVATE_KEY}" | ssh-add -
1211
fi
1312

14-
if [ "$SSH_KNOWN_HOSTS" ]; then
15-
touch ~/.ssh/known_hosts
16-
echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
17-
chmod 644 ~/.ssh/known_hosts
18-
fi
19-
2013
if [ "$SSH_KNOWN_HOSTS" == "NoStrictHostKeyChecking" ]; then
2114
touch ~/.ssh/config
2215
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >> ~/.ssh/config
16+
elif [ "$SSH_KNOWN_HOSTS" ]; then
17+
touch ~/.ssh/known_hosts
18+
echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
19+
chmod 644 ~/.ssh/known_hosts
2320
fi
2421

2522
exec "$@"

0 commit comments

Comments
 (0)