Releases: alcharra/docker-deploy-action
v2.3.1
v2.3.1 – Compose Validation and Swarm Error Detection
This release enhances validation and error handling for Docker Compose and Docker Swarm deployments. It also includes important bug fixes and script improvements for better POSIX compliance.
What’s New
-
Docker Compose file validation
- Validates
docker-compose
files usingdocker compose config
- Helps catch syntax errors and misconfigurations early in the deployment process
- Validates
-
Improved Docker Swarm deploy checks
- Parses
docker stack deploy
output for common errors, including:- Undefined volumes
- Unsupported options
- Missing files
- General CLI errors
- Parses
What’s Fixed
-
Absolute path requirement for
deploy_file
- Resolved a bug where the deployment file required an absolute path unnecessarily
-
POSIX compliance improvements
- Refactored shell scripts for better compatibility:
- Replaced
[[ ... ]]
with[ ... ]
- Used
=
instead of==
for string comparisons - Rewrote
|| true
patterns using proper conditionals
- Replaced
- Refactored shell scripts for better compatibility:
Stability and Maintenance
- No breaking changes
- Fully compatible with workflows using
v2
- Improves reliability and portability across environments
Tags
v2.3.1
: Latest feature release (recommended)v2
: Stable major version tag for production workflows
Need help? Check the README or suggest a feature or improvement.
v2.3.0
v2.3.0 – Environment Variables Support and Backup Path Fix
This release adds support for dynamic environment variables via the env_vars
input and fixes an issue with backing up the Docker Compose file during deployment.
What’s New
env_vars
input for dynamic configuration- Allows setting environment variables via workflow inputs
- Automatically creates and uploads a
.env
file during deployment - Currently supported only in Docker Compose mode
What’s Fixed
- Docker Compose file backup path
- Fixed an issue where the deployment file wasn’t correctly backed up due to a path resolution error
- Ensures consistent file handling before upload
Stability and Maintenance
- No breaking changes
- Fully compatible with existing workflows using
v2
- Improves flexibility for environment-specific deployments
Tags
v2.3.0
: Latest feature release (recommended)v2
: Stable major version tag for production workflows
Need help? Check the README or suggest a feature or improvement.
v2.2.1
v2.2.1 – Fix for Script Path Resolution and Executable Scripts
This patch release resolves a script execution issue in GitHub Actions by correcting how paths are resolved and ensuring all internal scripts are properly marked as executable.
What’s Fixed
-
Script path resolution in GitHub Actions
- Fixed an issue where
entrypoint.sh
could not locate scripts in the./scripts/
directory when run as part of a composite action - Now uses
GITHUB_ACTION_PATH
(with a fallback) to consistently locate and run internal scripts
- Fixed an issue where
-
Executable permissions for scripts
- All scripts in the
./scripts
directory are now explicitly marked as executable - Prevents failures caused by missing execution permissions during CI runs
- All scripts in the
Stability and Maintenance
- No breaking changes
- Fully compatible with existing workflows using
v2
- Improves cross-platform support and reliability for GitHub-hosted runners
Tags
v2.2.1
: Latest patch release (recommended)v2
: Stable major version tag for production workflows
Need help? Check the README or suggest a feature or improvement.
v2.2.0
v2.2.0 – Targeted Docker Compose Restarts
This release adds support for more flexible control when restarting services in Docker Compose deployments. Users can now restart specific services without affecting the full stack, helping to reduce downtime and speed up deployments.
What’s New
- Targeted Service Restarts
compose_target_services
: Restart only selected services (e.g.web,worker
)compose_build
: Build images before starting services (if needed)compose_no_deps
: Skip restarting any linked (dependent) services- Useful for partial deployments and larger setups where restarting everything isn’t necessary
Improvements
- Updated example workflow in the README to show how the new options work in practice
- Refined descriptions for several inputs to make configuration easier to understand
Stability and Maintenance
- No breaking changes
- All new inputs are optional — existing setups will continue to work without any updates
- Designed for production use, but also useful in staging or test environments
Tags
v2.2.0
: Latest feature release (recommended)v2
: Stable version for current and future Bash workflows
Need help? Check the README, open an issue, or suggest a new feature.
v2.1.0
v2.1.0 – Modular Rewrite & SSH Security Features
This release introduces a full modular rewrite of the deployment logic and adds several SSH security-related options, improving flexibility, security and maintainability across Compose and Stack deployments.
What’s New
-
Modular Shell Script Structure
The deployment logic has been split into separate, focused scripts. This makes the action easier to understand, maintain and build upon. -
Passphrase Support for SSH Keys
Users can now provide anssh_key_passphrase
to support encrypted private keys usingssh-agent
. -
SSH Host Key Verification
The action now supports:ssh_known_hosts
: full OpenSSH-compatible known_hosts contentfingerprint
: a single-line public key for quick verification- If neither is provided, the host key is fetched via
ssh-keyscan
with a security warning
-
SSH Timeout Configuration
Atimeout
input has been added to limit SSH connection attempts, helping prevent hanging builds in CI environments. -
Conditional Compose Image Pulling
Users can now setcompose_pull
tofalse
to skipdocker-compose pull
, useful for offline or pre-pulled deployments.
Improvements
- All deployment logic has been restructured for clarity and reusability
- Docker Compose and Stack flows are now handled by separate scripts with correct environment and path handling
- More accurate and consistent logging throughout the deploy process
Stability and Maintenance
- Improved SSH connection handling with
ConnectTimeout
,ServerAliveInterval
andServerAliveCountMax
- All changes are backwards compatible — no breaking changes introduced
Tags
v2.1.0
: Latest release (recommended)v2
: Major version tag for stable workflows
Need help? Check the README, open an issue, or start a feature discussion.
v2.0.1
v2.0.1 – Stack Path Fix, Tests & Code Analysis
This patch release resolves a critical deployment issue for Docker Swarm (stack mode) and introduces automated testing and static code analysis into the CI pipeline.
Bug Fixes
- Fixed path handling for
docker stack deploy
The deployment process now correctly extracts only the filename fromdeploy_file
, preventing issues with broken paths such astests/stack/docker-stack.yml
on the remote server.
What’s Added
-
Deploy Test Workflow
A GitHub Actions workflow has been added to test bothcompose
andstack
deployments using test.env
,docker-compose.yml
anddocker-stack.yml
files. -
ShellCheck Integration
All shell scripts (includingentrypoint.sh
) are now statically analysed using ShellCheck to identify syntax issues and encourage best practices. -
README Improvements
The README has been restructured for better clarity, with updated examples and a test status badge.
Stability and Maintenance
- General clean-up and minor reliability improvements in script flow and debug output
- No breaking changes in this release
Tags
v2.0.1
: Latest patch release (recommended)v2
: Major version tag for stable workflows
Need help? Check the README, open an issue, or try the Go-based version for faster deployments.
v2.0.0
v2.0.0 – Breaking Changes & Rollback Support
This major release introduces automatic rollback, improved network validation and simplifies configuration by replacing deprecated inputs.
Breaking Changes
- Replaced
stack_files
andcompose_files
withdeploy_file
- Now accepts only a single file
- Any supporting files (e.g.
.env
,config.yml
) should be moved toextra_files
Migration Example
Before (v1.x):
stack_files: docker-stack.yml,docker-stack-dev.yml
extra_files: .env,config.yml
After (v2.x):
deploy_file: docker-stack.yml
extra_files: .env,config.yml
New Features
-
Automatic Rollback on Failed Deployments
- Swarm Mode: Uses
docker service update --rollback
- Compose Mode: Restores the last known good
deploy_file
if services fail to start
- Swarm Mode: Uses
-
Improved Network Management
- Validates existing Docker networks and warns if the driver does not match
- Verifies
overlay
driver and issues warnings if Swarm is inactive - Adds support for
docker_network_attachable
Bug Fixes and Improvements
- Removed the need for
sudo
when creating theproject_path
directory - Switched SSH command execution from here-doc (
EOF
) tobash -s
to suppress MOTD messages - Improved Docker Compose version detection:
- Supports both
docker-compose
(v1) anddocker compose
(v2)
- Supports both
Tags
v2.0.0
: Latest major release with breaking changesv2
: Stable tag for latest v2.x features
Important: Workflows using stack_files
or compose_files
must migrate to deploy_file
to continue functioning with v2.x.
v1.0.1
v1.0.1 – Fixes and Improvements
This patch release includes important fixes to ensure reliable script execution and proper SSH file transfers.
Bug Fixes
-
Fixed executable permissions
Ensuredentrypoint.sh
has the correct executable flag so it can run without manual intervention. -
Corrected SCP port flag
Updatedscp
to use the correct uppercase-P
flag for specifying the SSH port (instead of lowercase-p
).
Tags
v1.0.1
: Latest patch releasev1
: Recommended stable tag for GitHub Actions
Recommended upgrade if you encountered Permission denied
errors or issues with non-default SSH ports.
v1.0.0
v1.0.0 – Initial Release
This is the first stable release of the original Bash-based Docker Deploy GitHub Action, built to automate remote deployments over SSH with support for both Docker Compose and Docker Swarm.
Features
-
Seamless Remote Deployment
Uploads Docker Compose or Swarm stack files directly to your server via SSH and deploys automatically. -
Automatic Project Setup
Creates the target directory if it doesn’t exist, sets750
permissions and ensures correct ownership. -
Additional File Support
Uploads extra files such as.env
,traefik.yml
,nginx.conf
, or other custom configuration files. -
Private Registry Login
Supports secure Docker registry authentication (e.g., Docker Hub, GitHub Container Registry). -
Network Management
Creates missing Docker networks using specified drivers (bridge
,overlay
, etc.), with attachable support in Swarm. -
Reliable Deployment Modes
Supports:- Docker Compose via
docker-compose up
- Docker Swarm via
docker stack deploy
- Docker Compose via
-
Service Health Verification
Ensures services start successfully and remain healthy after deployment. -
Optional Cleanup
Can optionally perform a Docker system prune (removing unused images, containers, volumes, etc.) after deployment. -
Detailed Logs and Security
Provides structured logs with per-step output. Automatically deletes SSH key after deployment for added security.
Requirements
- Docker must be installed on the remote server.
- SSH access to the server (key-based authentication required).
- Docker Compose is required for
compose
mode. - Docker Swarm must be initialised and the server must be a manager for
stack
mode.
Tags
v1.0.0
: First stable releasev1
: Latest stable major version (recommended for use in GitHub Actions)
Need help? Check the README or open an issue. Contributions are welcome!