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 GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| remote_docker_host | Remote Docker host (format: user@host). Supports SSH connections. | yes | — |
| remote_docker_port | SSH port for remote host. Must be a valid port number (1-65535). Default: 22 | no | 22 |
| ssh_public_key | SSH public key content. Must match the private key. | yes | — |
| ssh_private_key | SSH private key content for authentication with remote host. | yes | — |
| args | Deployment command arguments. Examples: "up -d" for compose, "my-stack" for swarm (stack name only). Input is validated to prevent command injection. | yes | — |
| deployment_mode | Deployment mode. docker-compose for Compose files, docker-swarm for Swarm mode. | no | docker-compose |
| copy_stack_file | Copy stack file to remote server before deployment. Enables version rotation. | no | false |
| deploy_path | Remote path for stack file storage. Created automatically if it doesnt exist. | no | ~/docker-deployment |
| stack_file_name | Name of the docker-compose stack file. Supports any valid filename. | no | docker-compose.yml |
| keep_files | Total 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: 4 | no | 4 |
| docker_prune | Run docker system prune after deployment. Removes unused images, containers, and networks. Does NOT remove volumes by default. Use with caution. | no | false |
| prune_volumes | When 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: false | no | false |
| pre_deployment_command_args | Pre-deployment command arguments (docker-compose mode only). Example: "config" to validate. | no | — |
| pull_images_first | Pull images before deployment (docker-compose mode only). Ensures latest images are used. | no | false |
| docker_registry_username | Private Docker registry username. Required for private registry authentication. | no | — |
| docker_registry_password | Private Docker registry password. Use secrets for security. | no | — |
| docker_registry_uri | Private Docker registry URI. Default is Docker Hub. | no | https://registry.hub.docker.com |
Outputs
no outputs