-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.25 KB
/
synchronise.yaml
File metadata and controls
47 lines (43 loc) · 1.25 KB
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
45
46
47
name: Synchronise Environments
on:
workflow_call:
inputs:
ssh-host:
type: string
description: "SSH host to use"
required: true
ssh-port:
type: number
description: "SSH port to use"
required: false
default: 22
ssh-user:
type: string
description: "SSH user to connect"
required: false
default: piecode
synchronisation-script:
type: string
description: "Destination path to synchronisation script"
required: true
secrets:
SSH_PRIVATE_KEY:
description: "SSH private key"
required: true
jobs:
sync_remote:
runs-on: ubuntu-latest
steps:
- uses: pie/.github/actions/add-ssh-config@main
name: Add SSH Key to this runner
with:
ssh-port: ${{inputs.ssh-port}}
ssh-host: ${{inputs.ssh-host}}
ssh-key: ${{secrets.SSH_PRIVATE_KEY}}
- uses: pie/.github/actions/synchronise-remote@main
name: Running ${{inputs.synchronisation-script}} on remote
with:
ssh-port: ${{inputs.ssh-port}}
ssh-host: ${{inputs.ssh-host}}
ssh-user: ${{inputs.ssh-user}}
synchronisation-script: ${{inputs.synchronisation-script}}