diff options
| -rw-r--r-- | .github/actions/sshfs/action.yml | 59 | ||||
| -rw-r--r-- | .github/actions/stasis/action.yml | 3 | ||||
| -rw-r--r-- | .github/actions/stasis_install/action.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/pipeline_run.yml | 9 |
4 files changed, 68 insertions, 5 deletions
diff --git a/.github/actions/sshfs/action.yml b/.github/actions/sshfs/action.yml new file mode 100644 index 0000000..04f1b0c --- /dev/null +++ b/.github/actions/sshfs/action.yml @@ -0,0 +1,59 @@ +name: SSHFS + +description: | + Mount data areas using SSHFS + +inputs: + user: + type: string + required: true + default: "" + + password: + type: string + required: true + default: "" + + remote_host: + type: string + required: true + default: "" + + remote_dir: + type: string + required: true + default: "" + + local_dir: + type: string + required: false + default: ${{ inputs.remote_dir }} + +runs: + using: "composite" + env: + SSHFS_USER: ${{ inputs.user }} + SSHFS_PASS: ${{ inputs.password }} + steps: + - name: Mask inputs + run: | + echo "::add-mask::$SSHFS_USER" + echo "::add-mask::$SSHFS_PASS" + shell: bash + + - name: Install SSHFS + run: | + sudo apt update + sudo apt -y install sshfs + shell: bash + + - name: Mount ${{ inputs.remote_dir }} at ${{ inputs.local_path }} + run: | + sudo mkdir -p ${{ inputs.local_dir }} + sudo sshfs \ + -o StrictHostKeyChecking=no,password_stdin,allow_other,default_permissions \ + $SSHFS_USER@${{ inputs.remote_host}}:${{ inputs.remote_dir }} \ + ${{ inputs.local_dir }} \ + <<< "$SSHFS_PASS" + + shell: bash diff --git a/.github/actions/stasis/action.yml b/.github/actions/stasis/action.yml index 09167db..19ccbe3 100644 --- a/.github/actions/stasis/action.yml +++ b/.github/actions/stasis/action.yml @@ -149,8 +149,6 @@ env: runs: using: "composite" steps: - - uses: actions/checkout@v4 - - name: Set TMPDIR run: | echo TMPDIR=${{ runner.temp }} >> $GITHUB_ENV @@ -197,7 +195,6 @@ runs: if [[ -n "${{ inputs.option_python }}" ]]; then echo "option_python=--python=${{ inputs.option_python }}" >> $GITHUB_ENV fi - if [[ "${{ inputs.option_verbose }}" == "true" ]]; then echo "option_verbose=--verbose" >> $GITHUB_ENV fi diff --git a/.github/actions/stasis_install/action.yml b/.github/actions/stasis_install/action.yml index 42fed99..0fe88f2 100644 --- a/.github/actions/stasis_install/action.yml +++ b/.github/actions/stasis_install/action.yml @@ -35,8 +35,6 @@ runs: using: "composite" steps: - uses: actions/checkout@v4 - - - uses: actions/checkout@v4 with: repository: 'spacetelescope/stasis' path: ${{ github.workspace }}/stasis diff --git a/.github/workflows/pipeline_run.yml b/.github/workflows/pipeline_run.yml index 0acb5cb..bc5abb6 100644 --- a/.github/workflows/pipeline_run.yml +++ b/.github/workflows/pipeline_run.yml @@ -61,6 +61,15 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Mount data area + uses: ./.github/actions/sshfs + with: + user: abcd + password: efghijk + remote_host: example.tld + remote_dir: /data + local_dir: /mydata + - name: STASIS (${{ runner.os }}-${{ runner.arch }}) uses: ./.github/actions/stasis with: |
