Skip to content

check ssh connection docker-image.yml #11

check ssh connection docker-image.yml

check ssh connection docker-image.yml #11

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download BlazeFace
uses: actions/checkout@v3
with:
repository: 'hollance/BlazeFace-PyTorch'
path: 'model/blazeface'
- name: Build the Docker image
run: docker build . --file build/Dockerfile --tag the-smile:$(date +%Y%m%d-%s) --tag the-smile:latest
- name: Tar the image
run: docker save the-smile:latest | gzip > smile_latest.tar.gz
- name: copy image to server
run: ssh -i <(echo $key) $user@$host ls -la
env:
host: ${{ secrets.SSH_HOST }}
user: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
# - name: copy file via ssh key
# uses: appleboy/[email protected]
# with:
# host: ${{ secrets.SSH_HOST }}
# username: ${{ secrets.SSH_USER }}
# port: 22
# key: ${{ secrets.SSH_KEY }}
# source: "smile_latest.tar.gz"
# target: /srv/smile/smile_latest.tar.gz