init docker-remote-deployment-action

This commit is contained in:
Sulthon Zainul Habib
2021-12-25 23:28:35 +07:00
commit f5a3ef47cb
5 changed files with 264 additions and 0 deletions

61
action.yml Normal file
View File

@@ -0,0 +1,61 @@
name: Docker Deployment
description: A GitHub Action that supports docker-compose and Docker Swarm deployments
inputs:
remote_docker_host:
description: Remote Docker host ie (user@host).
required: true
remote_docker_port:
description: Remote Docker ssh port ie (22).
required: false
default: '22'
ssh_public_key:
description: Remote Docker SSH public key eg (~/.ssh/rsa_id.pub).
required: true
ssh_private_key:
description: SSH private key used to connect to the docker host eg (~/.ssh/rsa_id).
required: true
args:
description: Deployment command args.
required: true
deployment_mode:
description: Deployment mode either docker-swarm or docker-compose. Default is docker-compose.
required: false
copy_stack_file:
description: Copy stack file to remote server and deploy from the server. Default is false.
required: false
deploy_path:
description: The path where the stack files will be copied to. Default ~/docker-deployment.
required: false
stack_file_name:
description: Docker stack file used. Default is docker-compose.yml.
required: false
keep_files:
description: Number of the files to be kept on the server. Default is 3.
required: false
docker_prune:
description: A boolean input to trigger docker prune command. Default is false.
required: false
pre_deployment_command_args:
description: The args for the pre deploument command.
required: false
pull_images_first:
description: Pull docker images before deploying. Default is false.
required: false
docker_registry_username:
description: The docker registry username.
required: false
docker_registry_password:
description: The docker registry password.
required: false
docker_registry_uri:
description: The docker registry URI. Default is https://registry.hub.docker.com.
required: false
runs:
using: docker
image: Dockerfile
branding:
icon: send
color: green