Skip to content

Commit

Permalink
Add optional -O flag for SCP compatability for older systems. (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianjnuwu authored Oct 25, 2024
2 parents 6128506 + fff1b57 commit ea28306
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ inputs:
RUN:
description: "Specify the commands to be executed after the deploy."
required: false
COMPATABILITY:
description: "Add the '-O' compatability flag to the SCP command for targets with older verions of OPENSSH (ie: Ubuntu 14.X)."
required: false
type: boolean

runs:
using: "composite"
Expand Down Expand Up @@ -51,13 +55,23 @@ runs:
ssh ssh rm -rf "${{ inputs.FOLDER }}";
shell: bash
- name: 💧 deploy to vps...
if: inputs.COMPATABILITY == 'false'
run: |
cd ..
IN="${{ inputs.REPO }}"
set -- "$IN"
IFS="/"; declare -a Array=($*)
scp -r ${Array[1]} ssh:/${{ inputs.FOLDER }}
shell: bash
shell: bash
- name: 💧 deploy to vps with compatability...
if: inputs.COMPATABILITY == 'true'
run: |
cd ..
IN="${{ inputs.REPO }}"
set -- "$IN"
IFS="/"; declare -a Array=($*)
scp -O -r ${Array[1]} ssh:/${{ inputs.FOLDER }}
shell: bash
- name: 🍷 Executing commands...
if: ${{ inputs.RUN }}
run: ssh ssh "${{ inputs.RUN }}"
Expand Down

0 comments on commit ea28306

Please sign in to comment.