{"id":14985980,"url":"https://github.com/wshihadeh/docker-deployment-action","last_synced_at":"2025-04-07T11:08:17.647Z","repository":{"id":40641487,"uuid":"262756320","full_name":"wshihadeh/docker-deployment-action","owner":"wshihadeh","description":"A GitHub Action that supports docker-compose and Docker Swarm deployments","archived":false,"fork":false,"pushed_at":"2024-01-27T18:42:47.000Z","size":21,"stargazers_count":133,"open_issues_count":16,"forks_count":75,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T09:08:17.416Z","etag":null,"topics":["action","github","githubactions"],"latest_commit_sha":null,"homepage":"https://docs.shihadeh.dev","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wshihadeh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-10T09:51:51.000Z","updated_at":"2025-03-12T17:32:32.000Z","dependencies_parsed_at":"2024-06-18T15:20:35.493Z","dependency_job_id":"7f449feb-9c74-4bfa-b032-339fc65e96b1","html_url":"https://github.com/wshihadeh/docker-deployment-action","commit_stats":{"total_commits":16,"total_committers":7,"mean_commits":"2.2857142857142856","dds":0.4375,"last_synced_commit":"878e5822321b7acbcee5fe5fdb926d61d27656d6"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wshihadeh%2Fdocker-deployment-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wshihadeh%2Fdocker-deployment-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wshihadeh%2Fdocker-deployment-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wshihadeh%2Fdocker-deployment-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wshihadeh","download_url":"https://codeload.github.com/wshihadeh/docker-deployment-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640464,"owners_count":20971557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","github","githubactions"],"created_at":"2024-09-24T14:12:05.059Z","updated_at":"2025-04-07T11:08:17.627Z","avatar_url":"https://github.com/wshihadeh.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Deployment Action\n\nA [GitHub Action](https://github.com/marketplace/actions/docker-deployment) that supports docker-compose and Docker Swarm deployments. [Documentaion Page](https://wshihadeh.github.io/actions/Docker-Deployment/).\n\n\n## Example\n\nBelow is a brief example on how the action can be used:\n\n```yaml\n- name: Deploy to Docker swarm\n  uses: wshihadeh/docker-deployment-action@v1\n  with:\n    remote_docker_host: user@myswarm.com\n    ssh_private_key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}\n    ssh_public_key: ${{ secrets.DOCKER_SSH_PUBLIC_KEY }}\n    deployment_mode: docker-swarm\n    copy_stack_file: true\n    deploy_path: /root/my-deployment\n    stack_file_name: docker-compose.yaml\n    keep_files: 5\n    args: my_applicaion\n```\n\n## Input Configurations\n\nBelow are all of the supported inputs. Some inputs are considered sensitive information and it should be stored as secrets.\n\n### `args`\n\nArguments to pass to the deployment command either  `docker`  or `docker-compose`. The actions will automatically generate the follwing commands for each of the cases.\n\n- `docker stack deploy --compose-file $FILE --log-level debug --host $HOST`\n- `docker-compose -f $INPUT_STACK_FILE_NAME`\n\n\n### `remote_docker_host`\n\nSpecify Remote Docker host. The input value must be in the follwing format (user@host)\n\n### `remote_docker_port`\n\nSpecify Remote Docker ssh port if its not 22 default ie (2222)\n\n### `ssh_public_key`\n\nRemote Docker SSH public key. \n\nDo not give the content of `id_rsa.pub`\n\nThe content of `~/.ssh/known_hosts` needs to be given here. You can get it by connecting to host once using your own machine. Example:\n\n```\n1.1.1.1 ecdsa-sha2-nistp256 AAAAE2VjZHNhLNTYAAAAIbmlzdHAyNCN5F3TLxUllpSRx8y+9C2uh+lWZDFmAsFMjcz2Zgq4d5F+oGicGaRk=\n```\n\n### `ssh_private_key`\n\nSSH private key used to connect to the docker host\n\nSSH key must be in PEM format (begins with -----BEGIN RSA PRIVATE KEY-----), or you can randomly get _Load key \"/HOME/.ssh/id_rsa\": invalid format_ error.\n\nConvert it from OPENSSH (key begins with -----BEGIN OPENSSH PRIVATE KEY-----)  format using `ssh-keygen -p -m PEM -f ~/.ssh/id_rsa`\n\n### `deployment_mode`\nDeployment mode either docker-swarm or docker-compose. Default is docker-compose.\n### `copy_stack_file`\nCopy stack file to remote server and deploy from the server. Default is false.\n### `deploy_path`\nThe path where the stack files will be copied to. Default ~/docker-deployment.\n### `stack_file_name`\nDocker stack file used. Default is docker-compose.yaml\n### `keep_files`\nNumber of the files to be kept on the server. Default is 3.\n### `docker_prune`\nA boolean input to trigger docker prune command.\n### `pre_deployment_command_args`\nThe args for the pre deploument command. Applicable only for docker-compose.\n### `pull_images_first`\nPull docker images before deploying. Applicable only for docker-compose.\n\n## License\n\nThis project is licensed under the MIT license. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwshihadeh%2Fdocker-deployment-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwshihadeh%2Fdocker-deployment-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwshihadeh%2Fdocker-deployment-action/lists"}