Go to file
Jean-Baptiste VESLIN 3d97e5b8eb
feat: exit 1 if app.py exited 1
2021-03-04 17:44:13 +01:00
.github/workflows update action 2020-06-13 15:31:44 +02:00
test initial ssh scp ssh action 2020-06-12 02:12:15 +02:00
.gitignore trim space 2020-06-13 09:14:31 +02:00
Dockerfile Update Dockerfile 2020-07-21 21:59:43 +08:00
LICENSE Initial commit 2020-06-11 20:12:43 +02:00
README.md update action 2020-06-13 15:31:44 +02:00
action.yml initial ssh scp ssh action 2020-06-12 02:12:15 +02:00
app.py feat: exit(1), don't raise 2021-03-04 17:18:32 +01:00
entrypoint.sh feat: exit 1 if app.py exited 1 2021-03-04 17:44:13 +01:00
requirements.txt use python 2020-06-13 08:46:25 +02:00

README.md

SSH SCP SSH Pipelines

Github actions

SSH action

SCP action

This action allows doing in order

  1. ssh if defined
  2. scp if defined
  3. ssh if defined

Inputs

see the action.yml file for more detail imformation.

host

Required ssh remote host.

port

NOT Required ssh remote port. Default 22

user

Required ssh remote user.

pass

NOT Required ssh remote pass.

key

NOT Required ssh remote key as string.

connect_timeout

NOT Required connection timeout to remote host. Default 30s

first_ssh

NOT Required execute pre-commands before scp.

scp

NOT Required scp from local to remote.

Syntax local_path => remote_path e.g. /opt/test/* => /home/github/test

last_ssh

NOT Required execute pre-commands after scp.

Usages

see the deploy.yml file for more detail imformation.

ssh scp ssh pipelines

- name: ssh scp ssh pipelines
  uses: cross-the-world/ssh-scp-ssh-pipelines@latest
  env:
    WELCOME: "ssh scp ssh pipelines"
    LASTSSH: "Doing something after copying"
  with:
    host: ${{ secrets.DC_HOST }}
    user: ${{ secrets.DC_USER }}
    pass: ${{ secrets.DC_PASS }}
    port: ${{ secrets.DC_PORT }}
    connect_timeout: 10s
    first_ssh: |
      rm -rf /home/github/test
      ls -la  \necho $WELCOME 
      mkdir -p /home/github/test/test1 && 
      mkdir -p /home/github/test/test2 &&      
    scp: |
      './test/*' => /home/github/test/
      ./test/test1* => /home/github/test/test1/
      ./test/test*.csv => "/home/github/test/test2/"      
    last_ssh: |
      echo $LASTSSH && 
      (mkdir test1/test || true)
      || ls -la      

scp ssh pipelines

- name: scp ssh pipelines
  uses: cross-the-world/ssh-scp-ssh-pipelines@latest
  env:
    LASTSSH: "Doing something after copying"
  with:
    host: ${{ secrets.DC_HOST }}
    user: ${{ secrets.DC_USER }}
    pass: ${{ secrets.DC_PASS }}
    scp: |
      ./test/test1* => /home/github/test/test1/
      ./test/test*.csv => "/home/github/test/test2/"      
    last_ssh: |
      echo $LASTSSH 
      ls -la      

scp pipelines

- name: scp pipelines
  uses: cross-the-world/ssh-scp-ssh-pipelines@latest
  with:
    host: ${{ secrets.DC_HOST }}
    user: ${{ secrets.DC_USER }}
    pass: ${{ secrets.DC_PASS }}
    scp: |
      './test/*' => /home/github/test/