Skip to content

Commit 13b5f67

Browse files
author
Greg Bowler
committed
Pass domain to entrypoint
1 parent 5f3500a commit 13b5f67

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

action.yml

+5
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ inputs:
4343
description: The public key contents to use for private repositories
4444
required: false
4545

46+
ssh_domain:
47+
description: The domain to gether SSH public keys for (automatic for github.com, gitlab.com, bitbucket.org)
48+
required: false
49+
4650
outputs:
4751
time:
4852
description: 'The time the action was run'
@@ -59,6 +63,7 @@ runs:
5963
action_args: ${{ inputs.args }}
6064
action_ssh_key: ${{ inputs.ssh_key }}
6165
action_ssh_key_pub: ${{ inputs.ssh_key_pub }}
66+
action_ssh_domain: ${{ inputs.ssh_domain }}
6267

6368
branding:
6469
icon: 'package'

entrypoint

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ then
1010
ssh-keyscan -t rsa github.com >> /root/.ssh/known_hosts
1111
ssh-keyscan -t rsa gitlab.com >> /root/.ssh/known_hosts
1212
ssh-keyscan -t rsa bitbucket.org >> /root/.ssh/known_hosts
13+
14+
if [ -n "$action_ssh_domain" ]
15+
then
16+
ssh-keyscan -t rsa "$action_ssh_domain" >> /root/.ssh/known_hosts
17+
fi
18+
1319
echo "$action_ssh_key" > /root/.ssh/id_rsa
1420
echo "$action_ssh_key_pub" > /root/.ssh/id_rsa.pub
1521
chmod 600 /root/.ssh/id_rsa

0 commit comments

Comments
 (0)