-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
44 lines (43 loc) · 1.28 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: "GitHub Action Rust-on-Debian"
description: "GitHub Action to running Rust binary on Debian Bulls Eye."
branding:
icon: "box"
color: "red"
inputs:
project-directory:
description: "Working directory for the build."
required: true
project-name:
description: "Name of the binary to run."
required: true
ssh-user:
description: "SSH user."
required: true
ssh-host:
description: "SSH host."
required: true
ssh-private-key:
description: "SSH private key."
required: true
ssh-known-hosts:
description: "SSH known hosts."
required: true
runs:
using: "composite"
steps:
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Build for release
run: cargo build --release
shell: bash
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ inputs.ssh-private-key }}
known_hosts: ${{ inputs.ssh-known-hosts }}
- name: rsync over SSH
run: rsync -r ./target/release/ ${{ inputs.ssh-user }}@${{ inputs.ssh-host }}:${{ inputs.project-directory }}
shell: bash
- name: Start process
run: ssh ${{ inputs.ssh-user }}@${{ inputs.ssh-host }} 'bash -s' < start.sh ./${{ inputs.project-directory }} ${{ inputs.project-name }}
shell: bash