DEVEX-20:
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
name: "Clone OTP"
|
||||
description: "Build docker image with docker"
|
||||
|
||||
inputs:
|
||||
ssh-private-key:
|
||||
description: "SSH private key for cloning"
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: "Configure proxy"
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ inputs.ssh-private-key }}" > ~/.ssh/my_key
|
||||
cat > ~/.ssh/config << 'EOF'
|
||||
Host bitbucket.isb
|
||||
HostName bitbucket.isb
|
||||
User git
|
||||
IdentityFile ~/.ssh/my_key
|
||||
ProxyCommand socat - PROXY:192.168.76.142:%h:%p,proxyport=8077
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile /dev/null
|
||||
IdentitiesOnly yes
|
||||
EOF
|
||||
chmod 600 ~/.ssh/config
|
||||
chmod 600 ~/.ssh/my_key
|
||||
|
||||
- name: 'Cleanup'
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf ~/.ssh/config
|
||||
rm -rf ~/.ssh/my_key
|
||||
Reference in New Issue
Block a user