aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2025-01-17 13:56:42 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2025-01-17 13:56:42 -0500
commit95b92d6f03e0c7f6eabc1a080406db5ca3d30b47 (patch)
treeeb473b1b73fd3c134f4e299eb0c1cb387c05ad00 /.github
parent4b241911535c9cc6011e95ee3a95947d39501d5b (diff)
downloadghasandbox-95b92d6f03e0c7f6eabc1a080406db5ca3d30b47.tar.gz
OK
Diffstat (limited to '.github')
-rw-r--r--.github/actions/sshfs/action.yml11
1 files changed, 8 insertions, 3 deletions
diff --git a/.github/actions/sshfs/action.yml b/.github/actions/sshfs/action.yml
index 04f1b0c..c2f8325 100644
--- a/.github/actions/sshfs/action.yml
+++ b/.github/actions/sshfs/action.yml
@@ -27,7 +27,7 @@ inputs:
local_dir:
type: string
required: false
- default: ${{ inputs.remote_dir }}
+ default: ""
runs:
using: "composite"
@@ -49,11 +49,16 @@ runs:
- name: Mount ${{ inputs.remote_dir }} at ${{ inputs.local_path }}
run: |
- sudo mkdir -p ${{ inputs.local_dir }}
+ local_dir="${{ inputs.local_dir }}"
+ if [[ -z "$local_dir" ]]; then
+ local_dir="${{ inputs.remote_dir }}"
+ fi
+
+ sudo mkdir -p "$local_dir"
sudo sshfs \
-o StrictHostKeyChecking=no,password_stdin,allow_other,default_permissions \
$SSHFS_USER@${{ inputs.remote_host}}:${{ inputs.remote_dir }} \
- ${{ inputs.local_dir }} \
+ "$local_dir" \
<<< "$SSHFS_PASS"
shell: bash