{"id":16421370,"url":"https://github.com/leomp12/gcp-vms-cd","last_synced_at":"2026-06-13T04:31:32.294Z","repository":{"id":39985561,"uuid":"428779281","full_name":"leomp12/gcp-vms-cd","owner":"leomp12","description":"Node app for simple GCP VMs continuous deployment from GitHub using Pub/Sub","archived":false,"fork":false,"pushed_at":"2024-03-19T00:28:34.000Z","size":726,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2026-05-31T10:25:58.903Z","etag":null,"topics":["auto-scaling","google-cloud-platform","managed-instance-group"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/leomp12.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-11-16T18:58:03.000Z","updated_at":"2022-03-18T20:11:21.000Z","dependencies_parsed_at":"2024-11-10T09:40:46.387Z","dependency_job_id":"2a0a2b86-29b7-4559-a20c-3a3987aed1d0","html_url":"https://github.com/leomp12/gcp-vms-cd","commit_stats":{"total_commits":98,"total_committers":1,"mean_commits":98.0,"dds":0.0,"last_synced_commit":"d769798d393e21671eeac8cff3faaf8c8e27023c"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/leomp12/gcp-vms-cd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leomp12%2Fgcp-vms-cd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leomp12%2Fgcp-vms-cd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leomp12%2Fgcp-vms-cd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leomp12%2Fgcp-vms-cd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leomp12","download_url":"https://codeload.github.com/leomp12/gcp-vms-cd/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leomp12%2Fgcp-vms-cd/sbom","scorecard":{"id":584772,"data":{"date":"2025-08-11","repo":{"name":"github.com/leomp12/gcp-vms-cd","commit":"e4ee724edbb35da7d700ea42eca37754805cd660"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'","Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-7v5v-9h63-cj86","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-g954-5hwp-pp24","Warn: Project is vulnerable to: GHSA-h755-8qp9-cq85","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T20:09:23.673Z","repository_id":39985561,"created_at":"2025-08-20T20:09:23.673Z","updated_at":"2025-08-20T20:09:23.673Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34272603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["auto-scaling","google-cloud-platform","managed-instance-group"],"created_at":"2024-10-11T07:32:26.614Z","updated_at":"2026-06-13T04:31:31.411Z","avatar_url":"https://github.com/leomp12.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GCP VMs CD\r\n\r\nNode app for simple GCP VMs ([MIGs](https://cloud.google.com/compute/docs/instance-groups))\r\ncontinuous deployment from GitHub using Pub/Sub.\r\n\r\n## Why ?\r\n\r\nHigh availability keeping infrastructure as simple and cheap as possible for less complex and stateless instances,\r\nno K8s (or Nomad) and no IaaC:\r\n\r\n_Cloud Load Balancing \u003e Stateless MIGs \u003e VMs on demand_\r\n\r\nStarts with a simple GCP VM turned to instance model after the first configuration,\r\nthen create instance the group (one by region) and setup load balancer with MIGs backends.\r\n\r\n**We can't just mock external IPs because VMs may be created and destroyed on demand,\r\nso this project is intended to provide simple CI/CD functionality using Pub/Sub (each VM as a subscriber)\r\nand GitHub Actions.**\r\n\r\n## Getting started\r\n\r\n### Setup on GCP\r\n\r\n1. Create [service account](https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account)\r\nand key with authorization to _Read_ and _Admin pub/sub_;\r\n\r\n2. [Create Pub/Sub topic](https://console.cloud.google.com/cloudpubsub/topic/list?modal=create_topic):\r\n  - Default name is *vms_cd*;\r\n  - Without initial subscriber.\r\n\r\n### Setup Node app on VM\r\n\r\n3. Save account key file on your VM:\r\n```bash\r\nnano ~/vms-cd-service-account.json\r\nchmod 640 ~/vms-cd-service-account.json\r\n```\r\n\r\n4. Clone repository and set minimal env:\r\n```\r\ngit clone -b main --single-branch https://github.com/leomp12/gcp-vms-cd\r\necho \"GOOGLE_APPLICATION_CREDENTIALS=\\\"$HOME/vms-cd-service-account.json\\\"\" \u003e gcp-vms-cd/.env\r\n```\r\n\r\n5. Start Node background service:\r\n```bash\r\nnode gcp-vms-cd/app.js # pm2 start \"/home/user/gcp-vms-cd/app.js\" --name \"deploy\" --max-memory-restart 200M --restart-delay=3000\r\n```\r\n\r\n### Setup GitHub Actions workflow\r\n\r\nAdd a _secret_ to your GitHub repository with name `GCP_ACCOUNT_KEY` and paste the\r\ncreated account key JSON, then setup the workflow file as following:\r\n\r\n```yml\r\n# .github/workflows/trigger-deploy.yml\r\nname: Trigger deploy to GCP VMs\r\n\r\non:\r\n  push:\r\n    branches:\r\n      - main\r\n\r\njobs:\r\n  publish:\r\n    name: Publish Pub/Sub message to VMs CD topic\r\n    runs-on: ubuntu-latest\r\n    steps:\r\n      - uses: actions/checkout@v2\r\n      - uses: leomp12/gcp-vms-cd@main\r\n        with:\r\n          gcp_account_key: ${{ secrets.GCP_ACCOUNT_KEY }}\r\n          pubsub_topic: 'vms_cd'\r\n          command_working_dir: '/home/user/apps/myapp'\r\n          command_pull: 'git pull'\r\n          command_restart: 'npm run restart'\r\n          command_test: 'npm run test'\r\n          regex_test_output: 'active'\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleomp12%2Fgcp-vms-cd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleomp12%2Fgcp-vms-cd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleomp12%2Fgcp-vms-cd/lists"}