{"id":42763676,"url":"https://github.com/opsguild/metaldeploy","last_synced_at":"2026-01-29T21:02:48.650Z","repository":{"id":322830880,"uuid":"1090960635","full_name":"OpsGuild/MetalDeploy","owner":"OpsGuild","description":"A comprehensive GitHub Action for deploying applications to baremetal servers via SSH. This action supports three deployment modes: baremetal (direct to server), Docker, and Kubernetes.","archived":false,"fork":false,"pushed_at":"2026-01-28T21:08:39.000Z","size":185,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-28T23:25:45.426Z","etag":null,"topics":["bare-metal","ci-cd","deploy","devops","docker","infra","kubernetes","pipeline","workflow"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/baremetal-pipeline","language":"Python","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/OpsGuild.png","metadata":{"files":{"readme":"README.md","changelog":"changelogs/2026-01-28_08-11-32.md","contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-06T11:19:55.000Z","updated_at":"2026-01-28T15:15:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"1d3f6c86-dc2a-4a37-87e5-549dda64087c","html_url":"https://github.com/OpsGuild/MetalDeploy","commit_stats":null,"previous_names":["opsguild/vps-deploy"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/OpsGuild/MetalDeploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpsGuild%2FMetalDeploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpsGuild%2FMetalDeploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpsGuild%2FMetalDeploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpsGuild%2FMetalDeploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpsGuild","download_url":"https://codeload.github.com/OpsGuild/MetalDeploy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpsGuild%2FMetalDeploy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28884706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T19:55:09.949Z","status":"ssl_error","status_checked_at":"2026-01-29T19:55:08.490Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bare-metal","ci-cd","deploy","devops","docker","infra","kubernetes","pipeline","workflow"],"created_at":"2026-01-29T21:02:45.769Z","updated_at":"2026-01-29T21:02:48.645Z","avatar_url":"https://github.com/OpsGuild.png","language":"Python","readme":"# MetalDeploy Action\n\nA comprehensive GitHub Action for deploying applications to baremetal servers via SSH. This action supports three deployment modes: baremetal (direct to server), Docker, and Kubernetes.\n\n## Features\n\n- 🔐 **Secure SSH Authentication** - Support for SSH keys or password authentication\n- 🎯 **Multiple Deployment Types** - Choose between baremetal (default), Docker, or Kubernetes deployments\n- 🐳 **Docker Support** - Automatic Docker and Docker Compose installation\n- ☸️ **Kubernetes Support** - Automatic k3s, kubectl, and helm installation\n- 🔧 **Auto Dependency Installation** - Installs git and other required tools\n- 🏷️ **Registry Support** - Supports GHCR, Docker Hub, and AWS ECR\n- 🌿 **Branch Management** - Automatic branch switching based on environment\n- ⚡ **Smart Defaults** - Automatically uses current repository and GitHub actor for Git operations\n- 📝 **Environment File Generation** - Automatically create `.env` files from GitHub secrets and variables\n- 🔒 **All-in-One Secret Support** - Store multiple variables in single secrets with multiple formats (ENV, JSON, YAML)\n- 🏗️ **Flexible File Structures** - Support single, flat, nested, auto, and custom file organization\n- 📦 **Artifact Copying** - Efficiently copy local build artifacts (dist/, node_modules) to the server with auto-compression\n- 🚀 **Multi-Server Deployment** - Deploy to multiple servers concurrently with smart variable distribution\n- 🎛️ **Priority System** - Environment-specific secrets override base secrets automatically\n- 🏗️ **Jenkins Compatible** - Fully compatible with Jenkins via pre-built GHCR image and Jenkinsfile\n\n## Quick Links\n\n- [Deployment Types](docs/deployment-types.md) - Baremetal, Docker, and Kubernetes details\n- [Git Authentication](docs/git-auth.md) - Token, SSH, and No-Auth methods\n- [Environment File Generation](docs/env-generation.md) - Dynamic `.env` creation from secrets\n- [Jenkins Integration](docs/jenkins.md) - Using MetalDeploy outside of GitHub Actions\n- [Manual CLI Usage](docs/manual-usage.md) - Running MetalDeploy directly from your machine\n- [Installation \u0026 Requirements](docs/installation.md) - What gets installed on your server\n\n## Default Values\n\nMetalDeploy provides smart defaults to minimize configuration:\n\n- **`git_url`**: Defaults to `${{ github.repositoryUrl }}` - automatically uses the current repository\n- **`git_user`**: Defaults to `${{ github.actor }}` - automatically uses the GitHub user triggering the workflow\n- **`deployment_type`**: Defaults to `baremetal` - direct server deployment without containers\n- **`git_auth_method`**: Defaults to `none` - no authentication (for public repos)\n- **`environment`**: Defaults to `dev` - development environment\n- **`remote_user`**: Defaults to `root` - root user on remote server\n- **`registry_type`**: Defaults to `ghcr` - GitHub Container Registry\n\n## Quick Start\n\n### For Local CLI Usage\n\nInstall MetalDeploy as a global command:\n```bash\ncurl -sSL https://raw.githubusercontent.com/OpsGuild/MetalDeploy/main/scripts/install.sh | bash\n```\n\nThen use it anywhere:\n```bash\nmetaldeploy --host 1.2.3.4 --user root --ssh-key ~/.ssh/id_rsa --type docker\n```\n\n### For GitHub Actions\n\n```yaml\n- name: Deploy with MetalDeploy\n  uses: OpsGuild/MetalDeploy@v1\n  env:\n    # Set/Override specific variables\n    ENV_APP_PORT: 9090\n  with:\n    git_auth_method: token\n    git_token: ${{ secrets.GITHUB_TOKEN }}\n    remote_host: ${{ secrets.REMOTE_HOST }}\n    ssh_key: ${{ secrets.SSH_PRIVATE_KEY }}\n    environment: prod\n    # Pass all secrets in one go (Zero-Config)\n    # environment: prod\n```\n\n### Advanced Example with Docker\n\n```yaml\n- name: Deploy with MetalDeploy\n  uses: OpsGuild/MetalDeploy@v1\n  with:\n    remote_host: ${{ secrets.REMOTE_HOST }}\n    ssh_key: ${{ secrets.SSH_PRIVATE_KEY }}\n    deployment_type: docker\n    environment: prod\n    registry_type: dockerhub\n    registry_username: ${{ secrets.DOCKERHUB_USERNAME }}\n    registry_username: ${{ secrets.DOCKERHUB_USERNAME }}\n    registry_password: ${{ secrets.DOCKERHUB_PASSWORD }}\n\n### Copying Build Artifacts\n\nCopy specific files or directories (like `node_modules` or `dist/`) to the server. The action automatically compresses them for fast transfer.\n\n```yaml\n- name: Deploy with Artifacts\n  uses: OpsGuild/MetalDeploy@v1\n  with:\n    remote_host: ${{ secrets.REMOTE_HOST }}\n    ssh_key: ${{ secrets.SSH_PRIVATE_KEY }}\n    # Copy local 'dist' folder to remote '/app/dist'\n    # Copy local 'package.json' to remote '/app/package.json'\n    copy_artifacts: \"dist/:dist, package.json:package.json\"\n```\n\n### Secure Secret Management\n\n- **Bulk Injection**: Use `ENV` to securely tunnel your raw variable block to your server.\n- **Manual Overrides**: Use the standard GitHub Action **`env:`** block to override secrets for specific steps.\n\n```yaml\n- name: Deploy with Overrides\n  uses: OpsGuild/MetalDeploy@v1\n  env:\n    ENV_APP_PORT: 3000 # This wins over repository secrets\n  with:\n    env_files_generate: true\n```\n\n### Multi-Server Deployment\n\nDeploy to multiple servers concurrently by providing comma-separated lists for host configuration. If variable lists are shorter than `remote_host`, values are reused/distributed smartly.\n\n- `remote_host`: `server1,server2,server3`\n- `remote_user`: `user1,user2` (user1-\u003eserver1, user2-\u003eserver2, user2-\u003eserver3)\n- `ssh_key`: `key1` (key1 used for all servers)\n\n```yaml\n- name: Deploy to Cluster\n  uses: OpsGuild/MetalDeploy@v1\n  with:\n    remote_host: \"10.0.1.1, 10.0.1.2, 10.0.1.3\"\n    remote_user: \"admin\" # Used for all hosts\n    ssh_key: ${{ secrets.CLUSTER_SSH_KEY }}\n    deployment_type: docker\n    environment: prod\n```\n```\n\n### For Jenkins\n\n```groovy\npipeline {\n    agent { docker { image \"ghcr.io/opsguild/metal-deploy:latest\" } }\n    stages {\n        stage('Deploy') {\n            steps {\n                script {\n                    def paramEnv = params.collect { k, v -\u003e \"${k}=\\${v}\" }\n                    withEnv(paramEnv) { sh \"python main.py\" }\n                }\n            }\n        }\n    }\n}\n```\n\n## Inputs \u0026 Outputs\n\nFor a full list of inputs and outputs, please see the [Action Metadata](action.yml).\n\n## Documentation\n\nComprehensive documentation can be found in the [docs/](docs/) directory:\n\n- [Deployment Types](docs/deployment-types.md): Detailed information about each deployment strategy.\n- [Git Authentication](docs/git-auth.md): How to configure repository access.\n- [Environment File Generation](docs/env-generation.md): Securely manage your application settings.\n- [Jenkins Integration](docs/jenkins.md): How to use this action in a Jenkins pipeline.\n- [Manual CLI Usage](docs/manual-usage.md): Guide for running the tool manually.\n- [Installation \u0026 Requirements](docs/installation.md): Details about server setup and dependencies.\n\n## Development \u0026 Testing\n\nSee [tests/README.md](tests/README.md) for details on the test suite and local development.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details\n\n## Support\n\nFor issues and feature requests, please open an issue on the [GitHub repository](https://github.com/OpsGuild/MetalDeploy).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsguild%2Fmetaldeploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopsguild%2Fmetaldeploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsguild%2Fmetaldeploy/lists"}