[ci] Enhancement: Cleanup SSH Action
@@ -6,11 +6,11 @@ name: SSH Setup
on:
workflow_call:
secrets:
- host:
+ hostname:
+ required: false
+ port:
required: true
- portnum:
- required: true
- sshkey:
+ key:
required: true
username:
required: true
@@ -21,16 +21,11 @@ jobs:
name: SSH Setup
runs-on: ubuntu-latest
steps:
- - name: Fetch Changes
- uses: appleboy/ssh-action@master
- with:
- host: ${{ secrets.host }}
- username: ${{ secrets.username }}
- key: ${{ secrets.key }}
- port: ${{ secrets.portnum }}
- script: |
+ - name: Setup SSH
+ shell: bash
+ run: |
mkdir -p $HOME/.ssh/
- echo "${{ secrets.sshkey }}" > "$HOME/.ssh/id_rsa"
+ echo "${{ secrets.key }}" > "$HOME/.ssh/id_rsa"
chmod 400 $HOME/.ssh/id_rsa
echo "Host *" > $HOME/.ssh/config
echo -e "\tStrictHostKeyChecking no" >> $HOME/.ssh/config
@@ -38,4 +33,4 @@ jobs:
echo -e "\tIdentitiesOnly yes" >> $HOME/.ssh/config
echo -e "\tPasswordAuthentication no" >> $HOME/.ssh/config
echo -e "\tUser ${{ secrets.username }}" >> $HOME/.ssh/config
- echo -e "\tPort ${{ secrets.portnum }}" >> $HOME/.ssh/config
+ echo -e "\tPort ${{ secrets.port }}" >> $HOME/.ssh/config
