sulthonzh/Docker Remote Deployment

Secure GitHub Action for Docker Compose and Docker Swarm deployments via SSH. Includes input validation, automatic cleanup, and private registry support.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
remote_docker_hostRemote Docker host (format: user@host). Supports SSH connections.yes
remote_docker_portSSH port for remote host. Must be a valid port number (1-65535). Default: 22no22
ssh_public_keySSH public key content. Must match the private key.yes
ssh_private_keySSH private key content for authentication with remote host.yes
argsDeployment command arguments. Examples: "up -d" for compose, "my-stack" for swarm (stack name only). Input is validated to prevent command injection.yes
deployment_modeDeployment mode. docker-compose for Compose files, docker-swarm for Swarm mode.nodocker-compose
copy_stack_fileCopy stack file to remote server before deployment. Enables version rotation.nofalse
deploy_pathRemote path for stack file storage. Created automatically if it doesnt exist.no~/docker-deployment
stack_file_nameName of the docker-compose stack file. Supports any valid filename.nodocker-compose.yml
keep_filesTotal number of stack file versions to keep, including the currently deployed file (when copy_stack_file=true). Example: keep_files=4 retains the current version plus up to 3 previous versions. Must be a positive integer. Default: 4no4
docker_pruneRun docker system prune after deployment. Removes unused images, containers, and networks. Does NOT remove volumes by default. Use with caution.nofalse
prune_volumesWhen docker_prune is true, also remove unused volumes. This is destructive and cannot be undone. Has no effect unless docker_prune is true. Allowed values: true, false. Default: falsenofalse
pre_deployment_command_argsPre-deployment command arguments (docker-compose mode only). Example: "config" to validate.no
pull_images_firstPull images before deployment (docker-compose mode only). Ensures latest images are used.nofalse
docker_registry_usernamePrivate Docker registry username. Required for private registry authentication.no
docker_registry_passwordPrivate Docker registry password. Use secrets for security.no
docker_registry_uriPrivate Docker registry URI. Default is Docker Hub.nohttps://registry.hub.docker.com

no outputs