{"id":24355580,"url":"https://github.com/mstrlaw/trunk-dev","last_synced_at":"2026-02-22T20:38:55.308Z","repository":{"id":272949344,"uuid":"918262263","full_name":"mstrlaw/trunk-dev","owner":"mstrlaw","description":"Trunk Based Development using GitHub workflows for CI/CD","archived":false,"fork":false,"pushed_at":"2025-01-17T21:45:30.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T13:14:03.827Z","etag":null,"topics":["cicd","poc","trunk-based-development"],"latest_commit_sha":null,"homepage":"https://trunk-dev.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mstrlaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-17T15:18:07.000Z","updated_at":"2025-01-17T21:45:31.000Z","dependencies_parsed_at":"2025-01-17T16:49:41.752Z","dependency_job_id":"c330d3db-f02d-4701-a261-be93d91a994c","html_url":"https://github.com/mstrlaw/trunk-dev","commit_stats":null,"previous_names":["mstrlaw/trunk-dev"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mstrlaw/trunk-dev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstrlaw%2Ftrunk-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstrlaw%2Ftrunk-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstrlaw%2Ftrunk-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstrlaw%2Ftrunk-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mstrlaw","download_url":"https://codeload.github.com/mstrlaw/trunk-dev/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstrlaw%2Ftrunk-dev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29726252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"last_error":"SSL_read: 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":["cicd","poc","trunk-based-development"],"created_at":"2025-01-18T17:58:06.894Z","updated_at":"2026-02-22T20:38:55.265Z","avatar_url":"https://github.com/mstrlaw.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trunk Based Development PoC\n\n### Complete repo demonstrating how to setup GitHub Actions for doing [Trunk Based Development](https://trunkbaseddevelopment.com/)\n\n#### Environments\n[![Production - trunk-dev.vercel.app](https://img.shields.io/static/v1?label=Production\u0026message=trunk-dev.vercel.app\u0026color=blue)](https://trunk-dev.vercel.app/)\n\n[![Staging - trunk-dev-staging.vercel.app](https://img.shields.io/static/v1?label=Staging\u0026message=trunk-dev-staging.vercel.app\u0026color=orange)](https://trunk-dev-staging.vercel.app/)\n\n**Bonus**:\n- Using [Playwright](https://playwright.dev/) for running E2E tests when integrating code\n- Deploying to [Vercel](https://vercel.com/)\n\n### Workflow Concepts\n\n1. A Workflow is what GitHub calls Action(s)\n2. Actions can have one or more Jobs, with one or more Steps\n3. Workflows are created under `.github/workflows` (GitHub treats any yml file under `workflows` as an Action to be executed)\n4. File name follows a pattern to loosely indicate the trigger method `on_\u003ctrigger-method\u003e.yml`\n\n### How it works\n\n1. Dev _commits code_ to any branch (no open PR yet) -\u003e Execute Linting job and deploys a preview URL to Vercel\n2. PR is _opened_ into `main` branch -\u003e Execute Test jobs\n3. PR is _merged_ into `main` branch -\u003e Project deployed to Staging env\n4. Tag is _created_ from `main` branch -\u003e Project deployed to Production env\n\n```mermaid\nsequenceDiagram\n    actor D as Dev\n    participant B as Branch\n    participant M as Main\n    participant V as Vercel\n\n    box GitHub\n        participant B\n        participant M\n    end\n\n    loop Push Code\n        D-\u003e\u003eB: Commit XYZ\n        Note over B: 1.Lint\u003cbr\u003e2.Built\u003cbr\u003e3.Trigger Vercel Deploy\n        B-\u003e\u003eV: Deploy \u003cPreview\u003e\n        Note over V: github-actions-vercel-8ga3p0aks-surfe.vercel.app\n    end\n\n    alt Open PR\n        B-\u003e\u003eM: New PR\n        Note over M: 1.Build\u003cbr\u003e2.1.Run Tests (Unit)\u003cbr\u003e2.2.Run Tests (E2E)\n    end\n    \n    alt Merge PR\n        B-\u003e\u003eM: Merge PR\n        Note over M: 1.Build\u003cbr\u003e2.Trigger Vercel Deploy\n        M-\u003e\u003eV: Deploy \u003cStaging\u003e\n        Note over V: trunkbased-cicd-workflow-staging.vercel.app\n    end\n\n    loop Create Tag\n\n        Note over M: 1.Build\u003cbr\u003e2.Trigger Vercel Deploy\n        M-\u003e\u003eV: Deploy \u003cProd\u003e\n        Note over V: trunkbased-cicd-workflow.vercel.app\n    end\n```\n\n### PoC Details\n\n- Project is a simple static site with 2 pages\n- Server is ran using [PM2](https://www.npmjs.com/package/pm2), which allows to run it in the background without blocking execution of job steps\n- Interfacing with Vercel in the CI is done using their [CLI](https://vercel.com/docs/cli)\n- Vercel project and org keys must be setup for using the CLI","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstrlaw%2Ftrunk-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmstrlaw%2Ftrunk-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstrlaw%2Ftrunk-dev/lists"}