Skip to content

Commit ea28306

Browse files
Add optional -O flag for SCP compatability for older systems. (#5)
2 parents 6128506 + fff1b57 commit ea28306

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

action.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ inputs:
2424
RUN:
2525
description: "Specify the commands to be executed after the deploy."
2626
required: false
27+
COMPATABILITY:
28+
description: "Add the '-O' compatability flag to the SCP command for targets with older verions of OPENSSH (ie: Ubuntu 14.X)."
29+
required: false
30+
type: boolean
2731

2832
runs:
2933
using: "composite"
@@ -51,13 +55,23 @@ runs:
5155
ssh ssh rm -rf "${{ inputs.FOLDER }}";
5256
shell: bash
5357
- name: 💧 deploy to vps...
58+
if: inputs.COMPATABILITY == 'false'
5459
run: |
5560
cd ..
5661
IN="${{ inputs.REPO }}"
5762
set -- "$IN"
5863
IFS="/"; declare -a Array=($*)
5964
scp -r ${Array[1]} ssh:/${{ inputs.FOLDER }}
60-
shell: bash
65+
shell: bash
66+
- name: 💧 deploy to vps with compatability...
67+
if: inputs.COMPATABILITY == 'true'
68+
run: |
69+
cd ..
70+
IN="${{ inputs.REPO }}"
71+
set -- "$IN"
72+
IFS="/"; declare -a Array=($*)
73+
scp -O -r ${Array[1]} ssh:/${{ inputs.FOLDER }}
74+
shell: bash
6175
- name: 🍷 Executing commands...
6276
if: ${{ inputs.RUN }}
6377
run: ssh ssh "${{ inputs.RUN }}"

0 commit comments

Comments
 (0)