You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note on structure: All files live directly in .github/workflows/. GitHub Actions does not support subfolders for workflows (including reusable ones), so grouping is done via naming prefixes (build-*, deploy-*, push-*).
All Docker workflows support GitHubs ghcr.io and custom registries. The registry is selected via the registry-host input, provide your own hostname for a custom registry or leave it empty, to use to use GitHubs ghcr.io Container Registry.
Secrets: All workflows explicitly declare their secret inputs. When using ghcr.io, authentication uses github.actor / GITHUB_TOKEN automatically. For a custom registry, you must pass REGISTRY_USER and REGISTRY_PASSWORD. All deploy workflows require SSH_HOST, SSH_USERNAME, and SSH_PRIVATE_KEY.
build-docker.yml
Input
Required
Type
Default
Description
registry-host
No
string
ghcr.io
Hostname of the Docker registry. Set to your custom registry hostname, or omit to use ghcr.io.
image-name
No
string
Repository name (owner/repo on ghcr.io)
Name of the Docker image (e.g. myapp). Defaults to the repository name, or owner/repo on ghcr.io. Overrides the default when provided.
version
Yes
string
-
Version tag of the Docker image (e.g. latest, v1.2.0, feature-test).
dockerfile
No
string
Dockerfile
Path to the Dockerfile relative to the repository root (e.g. docker/frontend/Dockerfile).
build-args
No
string
-
Newline-separated list of Docker build arguments (e.g. ARG_NAME=value).
cleanup
No
boolean
false
Delete old package versions in ghcr.io after the build. Only applies to ghcr.io.
keep-versions
No
number
3
Minimum number of versions to keep when cleanup is enabled. Only applies to ghcr.io.
Secret
Required
Description
REGISTRY_USER
No
Username for registries other than ghcr.io
REGISTRY_PASSWORD
No
Password or access token for registries other than ghcr.io
deploy-docker.yml
Input
Required
Type
Default
Description
registry-host
No
string
ghcr.io
Hostname of the Docker registry. Set to your custom registry hostname, or omit to use ghcr.io.
image-name
No
string
Repository name (owner/repo on ghcr.io)
Name of the Docker image (e.g. myapp). Defaults to the repository name, or owner/repo on ghcr.io. Overrides the default when provided.
version
Yes
string
-
Version tag of the Docker image to deploy (e.g. latest, cb423f).
container-name
Yes
string
-
Name for the Docker container on the server. The old container with this name is stopped and replaced.
run-arguments
No
string
-
Additional arguments for docker run, separated by commas (e.g. --restart always, -p 80:80).
cleanup
No
boolean
false
Remove dangling Docker images for this image on the server after deploy.
Secret
Required
Description
SSH_HOST
Yes
Hostname or IP address of the deployment server
SSH_USERNAME
Yes
Username used to connect to the deployment server
SSH_PRIVATE_KEY
Yes
Private SSH key used to connect to the deployment server
REGISTRY_USER
No
Username for registries other than ghcr.io
REGISTRY_PASSWORD
No
Password or access token for registries other than ghcr.io
deploy-docker-compose.yml
Input
Required
Type
Default
Description
registry-host
No
string
ghcr.io
Hostname of the Docker registry. Set to your custom registry hostname, or omit to use ghcr.io.
remote-path
Yes
string
-
Directory on the server where the compose file is placed and docker compose is executed (e.g. /opt/docker/myapp).
compose-file
No
string
docker-compose.yml
Path to the compose file inside the calling repository.
cleanup
No
boolean
false
Run docker image prune -f on the server after deploy to remove dangling images.
Secret
Required
Description
SSH_HOST
Yes
Hostname or IP address of the deployment server
SSH_USERNAME
Yes
Username used to connect to the deployment server
SSH_PRIVATE_KEY
Yes
Private SSH key used to connect to the deployment server
REGISTRY_USER
No
Username for registries other than ghcr.io
REGISTRY_PASSWORD
No
Password or access token for registries other than ghcr.io
deploy-to-server.yml
Input
Required
Type
Default
Description
deploy_path
Yes
string
-
Path on the server where the code is deployed.
excluded_objects
Yes
string
-
Files and directories to keep on the server, separated by commas.
stop_command
Yes
string
-
Command to stop the running program before deploying.
start_command
Yes
string
-
Command to start the program after deploying.
Secret
Required
Description
SSH_HOST
Yes
Hostname or IP address of the deployment server
SSH_USERNAME
Yes
Username used to connect to the deployment server
SSH_PRIVATE_KEY
Yes
Private SSH key used to connect to the deployment server
deploy-to-tmux.yml
Input
Required
Type
Default
Description
deploy_path
Yes
string
-
Path on the server where the code is deployed.
excluded_objects
Yes
string
-
Files and directories to keep on the server, separated by commas.
session_name
Yes
string
-
Name of the tmux session to create. The old session is killed before deploying.
start_command
Yes
string
-
Command to run inside the new tmux session.
Secret
Required
Description
SSH_HOST
Yes
Hostname or IP address of the deployment server
SSH_USERNAME
Yes
Username used to connect to the deployment server
SSH_PRIVATE_KEY
Yes
Private SSH key used to connect to the deployment server
push-to-server.yml
Input
Required
Type
Default
Description
deploy_path
Yes
string
-
Path on the server where the code is deployed.
excluded_objects
Yes
string
-
Files and directories to keep on the server, separated by commas.
Secret
Required
Description
SSH_HOST
Yes
Hostname or IP address of the deployment server
SSH_USERNAME
Yes
Username used to connect to the deployment server
SSH_PRIVATE_KEY
Yes
Private SSH key used to connect to the deployment server