forked from chaplyk/docker-compose-remote-action
-
Notifications
You must be signed in to change notification settings - Fork 7
/
action.yml
72 lines (72 loc) · 2.71 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Docker Compose Remote (SSH) Deploy
description: The action uses SSH (with tunnel, optional) to deploy using `docker compose up` or `docker stack deploy` on remote host
branding:
icon: server
color: blue
inputs:
ssh_host:
description: Remote host name.
required: true
ssh_port:
description: Remote SSH port.
default: '22'
ssh_user:
description: Remote user name.
required: true
ssh_jump_host:
description: Jump host name.
ssh_private_key:
description: Private SSH key used for logging into remote system.
required: true
ssh_host_public_key:
description: Remote host SSH public key (The content of `~/.ssh/known_hosts` needs to be given here).
required: true
ssh_jump_public_key:
description: Jump host SSH public key (The content of `~/.ssh/known_hosts` needs to be given here).
docker_compose_filename:
description: Docker compose file to use.
default: docker-compose.yml
docker_compose_prefix:
description: Prefix for docker compose containers.
docker_args:
description: Docker compose command arguments.
default: '-d --remove-orphans --build'
docker_use_stack:
description: Use docker stack instead of docker compose ("true" or "false").
default: 'false'
docker_env:
description: Docker Environment variables.
workspace:
description: A project directory to use.
default: 'workspace'
workspace_keep:
description: Whether to keep the workspace directory after the action has finished.
default: 'false'
container_registry:
description: Container registry server to use.
container_registry_username:
description: Container registry username to use.
container_registry_password:
description: Container registry password to use.
runs:
using: docker
# image: Dockerfile
image: docker://astappev/docker-compose-remote-action:latest
env:
SSH_USER: ${{ inputs.ssh_user }}
SSH_HOST: ${{ inputs.ssh_host }}
SSH_PORT: ${{ inputs.ssh_port }}
SSH_JUMP_HOST: ${{ inputs.ssh_jump_host }}
SSH_PRIVATE_KEY: ${{ inputs.ssh_private_key }}
SSH_HOST_PUBLIC_KEY: ${{ inputs.ssh_host_public_key }}
SSH_JUMP_PUBLIC_KEY: ${{ inputs.ssh_jump_public_key }}
DOCKER_COMPOSE_FILENAME: ${{ inputs.docker_compose_filename }}
DOCKER_COMPOSE_PREFIX: ${{ inputs.docker_compose_prefix }}
DOCKER_ARGS: ${{ inputs.docker_args }}
DOCKER_USE_STACK: ${{ inputs.docker_use_stack }}
DOCKER_ENV: ${{ inputs.docker_env }}
WORKSPACE: ${{ inputs.workspace }}
WORKSPACE_KEEP: ${{ inputs.workspace_keep }}
CONTAINER_REGISTRY: ${{ inputs.container_registry }}
CONTAINER_REGISTRY_USERNAME: ${{ inputs.container_registry_username }}
CONTAINER_REGISTRY_PASSWORD: ${{ inputs.container_registry_password }}