Bump ws from 8.16.0 to 8.17.1 in /devtools/lv #632
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test SSH Conn | |
on: | |
push: | |
branches: [dev] | |
tags-ignore: ["*"] | |
pull_request: | |
branches: [dev] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
LAFTOOLS_ROOT: /home/runner/work/LafTools/LafTools | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Execute SSH command | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.APP_SSH_HOST }} | |
port: ${{ secrets.APP_SSH_PORT }} | |
username: ${{ secrets.APP_SSH_USERNAME }} | |
key: ${{ secrets.APP_SSH_KEY }} | |
script: | | |
echo 'Running some command' | |
ls -la | |
mkdir -p /home/appuser/LafTools-dist | |
- name: Create a file | |
run: echo "Hello World" > /home/runner/work/LafTools/LafTools/abcd | | |
tar -czvf /home/runner/work/LafTools/LafTools/linux-x64.tar.gz /home/runner/work/LafTools/LafTools/abcd | |
- name: Write SSH key to file | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.APP_SSH_KEY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
- name: Install sshpass | |
run: sudo apt-get install sshpass -y | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Upload file via SFTP | |
run: | | |
sftp -o StrictHostKeyChecking=no -P ${{ secrets.APP_SSH_PORT }} ${{ secrets.APP_SSH_USERNAME }}@${{ secrets.APP_SSH_HOST }} <<EOF | |
put /home/runner/work/LafTools/LafTools/linux-x64.tar.gz /home/appuser/LafTools-dist/ | |
exit | |
EOF | |
rm ~/.ssh/id_rsa -rf | |
echo "File uploaded successfully! docker is $(docker --version) and docker-compose is $(docker-compose --version)" |