<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Depot on Medium]]></title>
        <description><![CDATA[Stories by Depot on Medium]]></description>
        <link>https://medium.com/@depotdev?source=rss-04be0da00b48------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*o72CW1OelSCVdpTXOgY_IQ.png</url>
            <title>Stories by Depot on Medium</title>
            <link>https://medium.com/@depotdev?source=rss-04be0da00b48------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:17:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@depotdev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to reduce CI/CD costs: Complete optimization checklist]]></title>
            <link>https://medium.com/build-performance/how-to-reduce-ci-cd-costs-complete-optimization-checklist-9fee4b69c5cd?source=rss-04be0da00b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fee4b69c5cd</guid>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Depot]]></dc:creator>
            <pubDate>Wed, 25 Jun 2025 19:28:16 GMT</pubDate>
            <atom:updated>2025-06-25T19:28:16.416Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iM5rXSCdwuHJ8YHpxQPVkw.png" /></figure><p>Most engineering teams overspend on CI/CD by 50% or more. Here’s how to cut your build costs in half without slowing down deployments.</p><p>For many DevOps and platform teams, CI/CD costs have started to feel a lot like cloud bills: vital to operations but often opaque and frustrating when they come in higher than expected. When finance leadership asks <em>“</em><a href="https://depot.dev/blog/devops-to-finance-explaining-ci-costs-to-your-cfo"><em>why is our CI spend increasing</em></a><em>?”,</em> engineers need to be ready with answers grounded in data, strategy, and efficiency.</p><p>This guide is your actionable checklist for minimizing CI/CD spend while maintaining (and hopefully accelerating) delivery velocity. It’s built from lessons learned auditing pipelines, right-sizing compute, and scaling developer productivity without runaway costs.</p><h3>Speed up your builds and tests</h3><h3>Use smaller base images</h3><p>Most DevOps shops use containerized environments, and those base images set the tone for speed and cost. Large images (like full Ubuntu or Node distributions) significantly increase startup time, bandwidth usage, and local caching requirements. A good best practice is to opt for minimal base images like alpine or stripped-down <a href="https://depot.dev/docs/container-builds/how-to-guides/optimal-dockerfiles">language-specific containers</a> (e.g., python:3-slim). Only add what you need. Over time, this reduces pull times, shortens job spin-up, and cuts network costs, especially if you’re running hundreds or thousands of jobs per week.</p><h3>Standardize environments</h3><p>Custom environments create variance, which in turn introduces friction and flakiness. Each unique config adds time to debug and demands more caching and memory. Instead, try to use shared base Docker images with predictable tooling and define consistent runner types in order to limit environmental drift across teams. This enables better caching, more efficient provisioning, and faster onboarding.</p><h3>Cache dependencies</h3><p>Downloading dependencies for every job run is one of the most unnecessary drains on both time and money. Whether you’re using npm, Maven, or pip, these libraries don’t change often. To avoid this, set up proper dependency caching in your CI system (e.g., using restore_cache and save_cache in CircleCI, or GitHub Actions’ cache action). This can <a href="https://depot.dev/blog/depot-magic-explained">reduce build times by 50–90%</a> depending on the project and eliminate redundant spend.</p><p>For languages like Go, Rust, and Java, intermediate build files (object files, compiled classes) can be reused between job runs. Recompiling the same code every time wastes compute and developer time, so set up intermediate artifact caching to allow for faster rebuilds, especially in monorepos or large projects with multiple build stages.</p><h3>Optimize test execution</h3><p>A full test suite is great, until it’s run on every commit. That’s overkill for most workflows. Take a smaller, modular approach instead: run smoke tests on every commit; run full suites on merge or deploy events; split tests to parallelize across runners; and skip unchanged modules by leveraging intelligent test orchestration. This avoids overloading your infrastructure and reduces cost per test run dramatically.</p><h3>Use the right infrastructure for the job</h3><h3>Bigger isn’t always better</h3><p>It’s common to default to the biggest runners available “just to be safe,” but this leads to chronic underutilization. Fix this with a quick analysis by logging CPU and memory usage for all job types, then identify low-usage jobs consuming large runners, and then assign appropriately sized instances per job profile. A simple reallocation can <a href="https://depot.dev/blog/slow-builds-are-costing-you-money">save thousands of dollars per month</a>, especially in a busy org running hundreds of jobs daily.</p><h3>Automate scaling</h3><p>If your team works mostly 9–5, you likely don’t really need 24/7 high-capacity runner fleets. Idle runners = wasted money. Focus instead on:</p><ul><li>autoscaling runners (e.g., GitHub Actions + self-hosted autoscaling runners)</li><li>scheduling scale-downs during off-peak hours</li><li>leveraging burstable instances in cloud CI providers</li></ul><h3>Audit job runtime and failure patterns</h3><p>Frequent retries, long-running builds, and flaky tests cost real money by wasting compute and engineer attention. Generate a report showing median job durations by workflow, failure rates by job, and retry frequency. This creates a case for eliminating low-value jobs, re-architecting slow steps, or investing in more stable testing libraries.</p><h3>Keep storage and transfer under control</h3><h3>Enforce retention policies</h3><p>Artifacts, cache files, and logs tend to accumulate and are rarely cleaned up unless there’s a crisis. Your policy should include automatic deletion of artifacts after 7–30 days (depending on build patterns), limited cache persistence based on branch or PR activity, tiered storage if available (ex. cold storage for historic logs). Don’t store what you’re not reading. It adds up.</p><h3>Fix the way your pipelines are built</h3><h3>Modular pipelines via microservices</h3><p>Monolithic pipelines can be slow, brittle, and expensive. With microservices, you can isolate changes to only affected components, parallelize builds and tests, and deploy smaller units faster. This minimizes wasted pipeline time and increases developer throughput.</p><h3>Shift left on quality and securit</h3><p>CICD is often your best line of defense for catching regressions, bugs, and vulnerabilities. The earlier you catch them, the cheaper the fix. Embed tools like static code analyzers, dependency vulnerability scans, and linting and style enforcement. These checks are low-cost but high-impact when compared to hotfixes or security breaches in production.</p><h3>Know when your CI is slowing you down</h3><h3>Run a routine ‘dial tone’ job</h3><p>This is a simple “canary” CI job that runs a rudimentary test job. It’s a fast, cheap way to detect baseline issues in your CI infrastructure. If this job is slow, failing, or queuing too long, you know the issue isn’t your code: it’s the CI provider or runner fleet. You can alert on high latency or lack of execution to detect outages early.</p><h3>Identify performance regressions</h3><p>Sometimes builds get slower and no one notices until it’s too late. Prevent this by tracking average build duration by commit, alerting on significant variance, and correlating performance dips with code changes. This makes it easy to revert problematic commits and maintain pipeline velocity.</p><h3>Monitor infrastructure-level metrics</h3><p>According to Datadog’s 2024 DevOps Report, 63% of pipeline failures stem from resource exhaustion. Key metrics to monitor include:</p><ul><li>CPU and memory usage per runner (alert if &gt;80% for 5+ minutes)</li><li>Network latency between services (&lt;50ms is ideal)</li><li>Disk I/O throughput on build servers</li></ul><p>Without infrastructure monitoring, CI/CD failures become harder to diagnose and fix, making them more likely to cause extensive downtime.</p><h3>Review your usage before someone else does</h3><h3>Perform regular CI cost audits</h3><p>Once a month, set a standing meeting for you and your team to <a href="https://depot.dev/blog/how-to-calculate-github-actions-usage">review usage and cost data</a> from your CI provider (e.g., GitHub Actions usage minutes, CircleCI credits, etc.). Look for spikes in job volume, high-cost workflows, and inefficient caching or artifact use. This equips you to get ahead of finance when problem areas arise and proactively target any areas for optimization.</p><h3>Set automated alerts</h3><p>Most CI platforms let you alert on jobs that exceed a resource/time threshold, failed workflows above a % rate, and unusually high credit usage. Don’t wait for finance to flag an overage. Be proactive and build alerts into your observability stack.</p><p>Create dashboards that show cost per workflow or per team, job durations and trends, and top failing or retry-heavy jobs. These visualizations make it easier to explain CI investments and trade-offs to stakeholders who aren’t engineers.</p><h3>Investigate 3rd party build accelerators</h3><h3>Send the jobs to a specialist</h3><p>Using your CI’s default runners (if you’ve exhausted any free credits) can be surprisingly slow and expensive compared to <a href="https://depot.dev/blog/comparing-github-actions-and-depot-runners-for-2x-faster-builds">new vendors that can do it faster</a> and cheaper than your CI. Investigate sending those jobs through a 3rd party runner provider (we have a somewhat biased view that Depot is a great choice) that can run those jobs faster and typically at half the cost of your CI.</p><h3>Maintenance is sneaky expensive</h3><p>There’s no doubt that self-hosted runners are, at face value, one of the cheapest ways to run your jobs. But don’t discount the person-hour cost of keeping a self-hosted runner in good shape, adding failback/availability/scalability, debugging during downtime etc. Trusting those runners to a 3rd party eliminates the bulk of that work.</p><h3>Lost productivity is a cost too</h3><p>Speaking of downtime, consider the cost of 20 devs waiting a few hours for your team to get, say, Jenkins working again after an outage. Those devs might get some work or documentation done, but some might just mentally check out after the first hour. And even a slow build isn’t without its drawbacks: if a pipeline takes more than 5 or 6 minutes, it’s not uncommon for an engineer to context switch a bunch and lose 20 minutes to socializing, snacking, walking the dog etc. Working with a 3rd party runner provider who obsesses over runner uptime and performance can eliminate much of that downtime risk.</p><h3>Last words</h3><p>CI/CD can be viewed as a cost center, but it’s also an incredibly important strategic enabler. By auditing your pipelines, right-sizing infrastructure, enforcing data discipline, and building observability into your workflows, you can dramatically reduce cost while increasing developer velocity.</p><p>The best optimizations deliver both lower costs and faster builds. <a href="https://depot.dev/blog/slow-builds-are-costing-you-money">Most teams can cut their CI spend in half</a> just by switching to more efficient infrastructure, and that’s before factoring in productivity gains from developers who aren’t waiting for slow builds.</p><p>When the CFO asks about CI spend, your response shouldn’t just be “we’re working on it.” Using this checklist, you should be able to confidently explain “here’s what we’ve done, here’s what we’ve saved, and here’s how we’re scaling efficiently.”</p><blockquote>Written by: John Stocks @ Depot</blockquote><p><em>Originally published at </em><a href="https://depot.dev/blog/how-to-reduce-cicd-costs-complete-optimization-guide"><em>https://depot.dev</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fee4b69c5cd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/build-performance/how-to-reduce-ci-cd-costs-complete-optimization-checklist-9fee4b69c5cd">How to reduce CI/CD costs: Complete optimization checklist</a> was originally published in <a href="https://medium.com/build-performance">Build Performance by Depot</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Container security at scale: Building untrusted images safely]]></title>
            <link>https://medium.com/build-performance/container-security-at-scale-building-untrusted-images-safely-d05ab3932695?source=rss-04be0da00b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/d05ab3932695</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[saas]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Depot]]></dc:creator>
            <pubDate>Tue, 17 Jun 2025 19:23:10 GMT</pubDate>
            <atom:updated>2025-06-17T19:23:10.283Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H8Ss66PcTT2bpDu1HOzvjg.png" /></figure><p>Many SaaS platforms need to run customer code securely and fast. Rather than building container infrastructure from scratch, you can use Depot’s API to handle the heavy lifting. Here’s how to build Go tooling that creates isolated projects, manages builds, and tracks metrics for your customer workloads.</p><p>A lot of our customers run into the same problem: they need to run code on behalf of their customers. Whether you’re hosting user-generated Python scripts, processing custom containers, or running code in isolated environments, you end up needing fast, reliable container builds that don’t become a bottleneck.</p><p>Rather than managing all the container orchestration complexity in-house, many of our customers outsource the container building to us and use our API for the heavy lifting. In this post, we’ll walk through how to use the Depot API to set up and administer isolated <a href="https://depot.dev/docs/core-concepts#projects">project</a> cache, report build metrics, and get build logs for your customer workloads.</p><p>We’ll use Go to build tooling that creates and manages container builds for a multi-tenant SaaS platform.</p><h3>Depot core API</h3><p>The Depot core API uses <a href="https://buf.build/depot/api/docs/main:depot.core.v1">buf.build</a>, so it supports both Connect and gRPC protocols.</p><p>Thanks to <a href="https://buf.build/docs/bsr/generated-sdks/#supported-languages">Buf</a>, we can automatically generate client libraries for many languages. In this example, we’ll use Go as the backend language, but Buf can be used in many other languages.</p><h3>Architecture overview</h3><p>We’ll build some tools to create isolated build environments for users. For a new user, we’ll create a new project and a new project-scoped token. Next, we’ll get container build metrics including durations. Finally, we’ll retrieve the container’s steps.</p><h3>Getting started with the Go Client</h3><p>First, let’s create a new go program.</p><pre>go mod init github.com/depot/saas</pre><p>Next, we’ll add the Connect Depot API clients.</p><pre>go get connectrpc.com/connect<br>go get buf.build/gen/go/depot/api/connectrpc/go<br>go get buf.build/gen/go/depot/api/protocolbuffers/go</pre><p>You can find the complete documentation for the Go client at the <a href="https://buf.build/gen/doc/go/depot/api/connectrpc/go:main:v1.18.1-1/~/buf.build/gen/go/depot/api/connectrpc/go/depot/core/v1/corev1connect/">Buf registry</a>.</p><h3>Creating projects for customer isolation</h3><p>We recommend mapping an individual user to a single Depot project. We’ll build a simple command-line tool that creates projects.</p><pre>mkdir -p ./cmd/project</pre><p>Add this to the file cmd/project/main.go:</p><pre>package main<br><br>import (<br> &quot;context&quot;<br> &quot;flag&quot;<br> &quot;fmt&quot;<br> &quot;log&quot;<br> &quot;net/http&quot;<br> &quot;os&quot;<br> &quot;time&quot;<br><br> &quot;buf.build/gen/go/depot/api/connectrpc/go/depot/core/v1/corev1connect&quot;<br> buildv1 &quot;buf.build/gen/go/depot/api/protocolbuffers/go/depot/build/v1&quot;<br> corev1 &quot;buf.build/gen/go/depot/api/protocolbuffers/go/depot/core/v1&quot;<br> &quot;connectrpc.com/connect&quot;<br>)<br><br>func main() {<br> var customerName string<br> flag.StringVar(&amp;customerName, &quot;name&quot;, &quot;&quot;, &quot;customer project name&quot;)<br> flag.Parse()<br><br> if customerName == &quot;&quot; {<br>  flag.Usage()<br>  return<br> }<br><br> depotToken := os.Getenv(&quot;DEPOT_TOKEN&quot;)<br> if depotToken == &quot;&quot; {<br>  fmt.Fprintln(os.Stderr, &quot;DEPOT_TOKEN required&quot;)<br>  return<br> }<br><br> ctx := context.Background()<br> id := createProject(ctx, customerName, depotToken)<br> fmt.Printf(&quot;Created Project ID %s for %s\n&quot;, id, customerName)<br>}<br><br>func createProject(ctx context.Context, customerName, depotToken string) string {<br> depotClient := corev1connect.NewProjectServiceClient(<br>  http.DefaultClient,<br>  &quot;https://api.depot.dev&quot;,<br> )<br><br> hardware := corev1.Hardware_HARDWARE_32X64<br> req := connect.NewRequest(&amp;corev1.CreateProjectRequest{<br>  Name:     customerName,<br>  RegionId: &quot;eu-central-1&quot;, // or us-east-1<br>  CachePolicy: &amp;corev1.CachePolicy{<br>   KeepGb: 30, // Keep 30 GB of cache<br>  },<br>  Hardware: &amp;hardware,<br> })<br><br> req.Header().Add(&quot;Authorization&quot;, &quot;Bearer &quot;+depotToken)<br> res, err := depotClient.CreateProject(ctx, req)<br> if err != nil {<br>  log.Fatal(err)<br> }<br><br> project := res.Msg.GetProject()<br> return project.ProjectId<br>}</pre><p>This program creates a named project with a Depot API client. It expects the environment variable, DEPOT_TOKEN to be set to an <a href="https://depot.dev/docs/container-builds/reference/api-authentication#generating-an-api-token">API token</a>. The token is used as a Bearer token. It sets the project&#39;s region to eu-central-1 and gives the project a 30GB cache quota. Additionally, it uses a non-default larger builder sized machine with 32 CPUs and 64GB of RAM. Those values are all configurable to give flexibility in build performance.</p><p>Here is how to run the program and its unique project ID output:</p><pre>go build ./cmd/project &amp;&amp; ./project -name my_customer<br><br>Created Project ID n9548n2qqx for my_customer</pre><h3>Managing customer projects</h3><p>Deleting projects removes all project cache and project tokens, preventing any further builds:</p><pre>func deleteProject(ctx context.Context, projectID, depotToken string) error {<br> depotClient := corev1connect.NewProjectServiceClient(<br>  http.DefaultClient,<br>  &quot;https://api.depot.dev&quot;,<br> )<br><br> req := connect.NewRequest(&amp;corev1.DeleteProjectRequest{<br>  ProjectId: projectID,<br> })<br><br> req.Header().Add(&quot;Authorization&quot;, &quot;Bearer &quot;+depotToken)<br> _, err := depotClient.DeleteProject(ctx, req)<br> return err<br>}</pre><p>Similar to creating a project, we create a client and request with bearer auth.</p><p>While managing projects, it is very useful to be able reset a project’s build cache in case a customer wishes to start fresh. Here is how to do so:</p><pre>func resetProject(ctx context.Context, projectID, depotToken string) error {<br> depotClient := corev1connect.NewProjectServiceClient(<br>  http.DefaultClient,<br>  &quot;https://api.depot.dev&quot;,<br> )<br><br> req := connect.NewRequest(&amp;corev1.ResetProjectRequest{<br>  ProjectId: projectID,<br> })<br><br> req.Header().Add(&quot;Authorization&quot;, &quot;Bearer &quot;+depotToken)<br> _, err := depotClient.ResetProject(ctx, req)<br> return err<br>}</pre><p>When a project has been reset, its cache will be reset and all currently running jobs will be canceled.</p><h3>Getting build metrics for customer analytics</h3><p>Ok, great, now that we can administer projects we can build containers for our customers. Check out the <a href="https://depot.dev/blog/go-code-to-container-depot-api">blog</a> on how to build a container using a project id.</p><p>Let’s assume several container builds have finished. We can list all those builds using the paginated ListBuilds API request. This example shows how to paginate through all of a project&#39;s builds. Likely, you&#39;ll need to add log when to stop paging when there are hundreds of builds.</p><p>Each build has an ID and some coarse timing metrics. The duration is the time it took the build to complete. The “saved duration” is the estimated time the Depot cache saved the customer for that step.</p><pre>func listBuilds(ctx context.Context, projectID, depotToken string) {<br> depotClient := corev1connect.NewBuildServiceClient(<br>  http.DefaultClient,<br>  &quot;https://api.depot.dev&quot;,<br> )<br> listBuilds := &amp;corev1.ListBuildsRequest{<br>  ProjectId: projectID,<br> }<br><br> for {<br>  req := connect.NewRequest(listBuilds)<br>  req.Header().Add(&quot;Authorization&quot;, &quot;Bearer &quot;+depotToken)<br><br>  res, err := depotClient.ListBuilds(ctx, req)<br>  if err != nil {<br>   log.Fatal(err)<br>  }<br><br>  for _, b := range res.Msg.GetBuilds() {<br>   fmt.Printf(&quot;Build ID: %s\n&quot;, b.BuildId)<br>   fmt.Printf(&quot;\tStatus: %s\n&quot;, b.Status)<br>   fmt.Printf(&quot;\tCreated At: %s\n&quot;, b.CreatedAt.AsTime())<br>   fmt.Printf(&quot;\tBuild Duration: %s\n&quot;, time.Duration(b.GetBuildDurationSeconds())*time.Second)<br>   fmt.Printf(&quot;\tSaved Duration: %s\n&quot;, time.Duration(b.GetSavedDurationSeconds())*time.Second)<br>   fmt.Printf(&quot;\tCached Steps: %d\n&quot;, b.GetCachedSteps())<br>   fmt.Printf(&quot;\tTotal Steps: %d\n&quot;, b.GetTotalSteps())<br>  }<br><br>  nextPageToken := res.Msg.GetNextPageToken()<br>  if nextPageToken == &quot;&quot; {<br>   break<br>  }<br><br>  listBuilds.PageToken = &amp;nextPageToken<br> }<br>}</pre><h3>Getting detailed build steps</h3><p>Each container build has multiple steps such as transferring build context and running programs. The Depot API also provides a breakdown of each step including its name, timings, and if the step errored or not. This is useful to visualize the entire container build process.</p><pre>func buildSteps(ctx context.Context, projectID, buildID, depotToken string) {<br> buildClient := buildv1connect.NewBuildServiceClient(http.DefaultClient, &quot;https://api.depot.dev&quot;)<br> req := connect.NewRequest(&amp;buildv1.GetBuildStepsRequest{<br>  ProjectId: projectID,<br>  BuildId:   buildID,<br> })<br> req.Header().Add(&quot;Authorization&quot;, &quot;Bearer &quot;+depotToken)<br><br> res, err := buildClient.GetBuildSteps(ctx, req)<br> if err != nil {<br>  log.Fatal(err)<br> }<br><br> for _, step := range res.Msg.GetBuildSteps() {<br>  fmt.Printf(&quot;Step Name: %s\n&quot;, step.Name)<br>  fmt.Printf(&quot;\tStarted At: %s\n&quot;, step.StartedAt.AsTime())<br>  fmt.Printf(&quot;\tFinished At: %s\n&quot;, step.GetCompletedAt().AsTime())<br>  fmt.Printf(&quot;\tHad Error: %t\n&quot;, step.HasError())<br> }<br>}</pre><h3>Building container infrastructure that scales</h3><p>With these building blocks, you can create solid container infrastructure for your customers. The isolated projects ensure security and performance isolation, while Depot’s caching dramatically reduces build times across your customer base.</p><p>This approach works well for platforms that need to:</p><ul><li>Execute customer code in isolated environments</li><li>Provide fast feedback loops for development workflows</li><li>Scale container builds without managing infrastructure complexity</li><li>Offer detailed build analytics to customers</li></ul><p>Whether you’re building a platform that runs customer Python code, or any other service that needs to execute user-generated containers, Depot’s API provides the performance and isolation you need without the operational overhead.</p><h3>Get started today</h3><p>Ready to build container infrastructure for your customers? <a href="https://depot.dev/sign-up">Sign up for Depot</a> and start with a 7-day free trial. Our Go client libraries make it easy to integrate Depot into your existing infrastructure.</p><p>Have questions about implementing customer container builds? Join our <a href="https://discord.gg/XpTfcVrr46">Community Discord</a> to chat with our team and other developers building similar solutions.</p><p>Author: Chris Goller @ Depot</p><p><em>Originally published at </em><a href="https://depot.dev/blog/container-security-at-scale-building-untrusted-images-safely"><em>https://depot.dev</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d05ab3932695" width="1" height="1" alt=""><hr><p><a href="https://medium.com/build-performance/container-security-at-scale-building-untrusted-images-safely-d05ab3932695">Container security at scale: Building untrusted images safely</a> was originally published in <a href="https://medium.com/build-performance">Build Performance by Depot</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps to finance: Explaining CI costs to your CFO]]></title>
            <link>https://medium.com/build-performance/devops-to-finance-explaining-ci-costs-to-your-cfo-3f825079c8a2?source=rss-04be0da00b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f825079c8a2</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[Depot]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 20:01:46 GMT</pubDate>
            <atom:updated>2025-06-12T20:01:46.996Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FdkQRDFoNfvnnBfrBXKXRQ.png" /></figure><p>Why did our CI costs spike 40% this quarter?” It’s the dreaded question that makes every DevOps engineer’s heart sink. This post will help you translate technical realities into financial terms, positioning yourself as a strategic partner instead of just another cost center asking for more budget.</p><p>Greater usage of your CI tool is a good thing. But as your toolchain scales, so does the bill, and it’s only a matter of time before your finance team starts asking questions (just ask anyone in DevOps who’s had to <a href="https://medium.com/@skondakoff/why-i-believe-every-devops-engineer-should-learn-cost-optimization-fad6eca54c83">field a call from their CFO explaining a 40% spike in AWS costs</a>). Sadly, justifying your CI spend to finance leadership can sometimes feel like speaking an entirely different language. This post will help you translate technical realities into financial terms, and to position yourself as a strategic partner, instead of ‘just’ a technologist.</p><h3>Quick Glossary</h3><p><strong>DevOps:</strong> a modern software development set of practices that emphasizes collaboration between development and operations/infrastructure teams. The goal is to release high-quality software faster and more reliably by automating workflows, improving communication, and using CI/CD pipelines.</p><p><strong>CI (Continuous Integration):</strong> the practice of automatically building and testing code every time a team member pushes changes to a shared repository. CI helps catch bugs early, speeds up release cycles, and enables frequent deployments.</p><p><strong>FinOps (Financial Operations):</strong> a discipline that brings financial accountability to cloud spending. FinOps aligns engineering, finance, and business teams to track, manage, and optimize costs in real time, enabling better decision-making without slowing down development.</p><p><strong>Build vs. Buy:</strong> a strategic decision on whether to develop custom internal tools or purchase third-party solutions. This is often a key consideration when evaluating CI platforms and infrastructure, with implications for cost, speed, and flexibility.</p><h3>Why this conversation matters in DevOps</h3><p>DevOps has grown to encompass more than just engineering velocity: it’s about delivering business value efficiently. And it’s the CFO’s job to measure that value across the company. They’re the ones tasked with aligning budget and strategy, sometimes even overseeing HR, which is a key function in DevOps transformation. When they ask, <em>“How are our CI tools working so far?”</em> they’re really asking, <em>“Has this been a wise allocation of capital and what needs to change to get better?”</em></p><p>So don’t be surprised when you get hauled into a quarterly reporting meeting to justify your team’s decisions and how they’re panning out.</p><p>To thrive in these meetings, the best DevOps teams are increasingly adopting a FinOps mindset. They’re expanding beyond the remit of ‘ship stuff faster’ to <em>ship stuff faster at great business value.</em></p><h3>How to explain your CI to a CFO</h3><p>Start by zooming out. Situate your CI within the broader DevOps toolchain and ground the conversation in a few fundamentals that everyone can agree on: why we implemented this CI tool in the first place; how we measure success; and how we’re tracking.</p><h3>Frame your CI spend around three core pillars:</h3><ul><li><strong>Why we bought this tool</strong>: Often, it’s the CFO who initiated the <a href="https://www.techtarget.com/searchitoperations/opinion/The-DevOps-process-is-hard-But-here-are-seven-ways-its-easy">DevOps process</a> in the first place by asking the CTO and CIO to increase innovation while lowering budgets. Tie the decision back to the speed, quality, and outcome goals that you initially set. Maybe your CI tool enabled your team to jump from weekly to daily deploys. That’s the ROI everyone can get behind.</li><li><strong>What metrics we’re responsible for</strong>: Stick to a few clear ones: lead time to production, build success rate, mean time to recovery (MTTR), and infrastructure cost per build are all strong options. If they ask for more, align on what they actually care about: reduced support tickets, better feature delivery, and fewer rollbacks.</li><li><strong>Where we’re succeeding and where we’re not</strong>: Be honest: if builds are slow or flaky, say so, and show how those hiccups have impacted business KPIs. If you’ve shaved 30% off build times through parallelization or ephemeral environments, highlight it. Or if CI bottlenecks prevented a bug fix from going out expediently, shine a light on how that hurt your customer commitments and what you recommend to make sure it doesn’t happen again. This is your opportunity to show how DevOps aligns with company goals.</li></ul><h3>How is spend tracking vs. target?</h3><p>This is where you bring data. Compare current monthly CI spend against your forecast, and normalize it against engineering headcount or number of builds. Are costs scaling linearly with team size? Are we running redundant or unnecessary jobs? Are we hitting diminishing returns?</p><h4>Summary of 2025 software delivery metrics</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*2txHS-KqpvsBB_6OpDQIWg.png" /><figcaption><em>Source: The 2025 State of Software Delivery</em></figcaption></figure><p>Use benchmarks. Show what best-in-class CI/CD looks like in your industry. Not to copy them, but to demonstrate you understand what ‘good’ looks like and where you stand. Highlight any recent optimization wins: maybe you switched to ARM-based runners and cut compute costs 40%, or introduced test skipping logic to avoid redundant runs. Or maybe you increased your build times by 40x by using a <a href="https://depot.dev/blog/depot-magic-explained?source=medium">3rd party service</a>.</p><p>It’s not just about enabling automation anymore. It’s gotta be cost-effective automation. When you walk into a stakeholder meeting and show that your team reduced cloud spend by 20% without impacting performance, you’re proving that DevOps is a strategic partner in the success of the business.</p><h3>What’s our plan going forward?</h3><p>This is where the rubber meets the road. Propose a pragmatic plan to improve efficiency. That might include:</p><ul><li>Auditing unused third-party integrations or legacy pipelines</li><li>Standardizing ephemeral environments to reduce runtime</li><li>Moving from on-demand to reserved compute instances</li><li>Consolidating tools</li><li>Jettisoning in-house runners for 3rd party services that are <a href="https://depot.dev/blog/comparing-github-actions-and-depot-runners-for-2x-faster-builds?source=medium">faster and offer lower TCO</a></li></ul><p>Finally, tie it all back to business outcomes. If you’re proposing a tooling upgrade or refactor, explain how it improves time-to-market or engineer throughput. And don’t forget the HR angle — DevOps transformation means retraining, restructuring, and readiness for change. The CFO is a key stakeholder in making that happen.</p><p>On that note, here are a few common questions your CFO might ask, and how to prep an answer for them:</p><p><strong>Why is our CI spend increasing month-over-month?</strong></p><blockquote><strong>Reply:</strong> We’re iterating faster and have seen an increase in developer activity, which has naturally driven more builds. However, we’re actively managing that growth by optimizing our pipelines. For example, reducing redundant test runs, implementing caching, and moving some jobs to lower-cost compute options. We’re tracking spend per build and are working toward keeping that metric stable even as volume grows.</blockquote><p><strong>What’s our ROI from our CI investment?</strong></p><blockquote><strong>Reply</strong>: CI helps us detect bugs earlier, release features faster, and reduce incidents in production. Since adopting our current setup, we’ve improved our deploy frequency by X%, and our lead time to production has dropped from Y days to Z. These improvements directly impact customer satisfaction, engineering throughput, and support load.</blockquote><p><strong>How might we do this more cost effectively?</strong></p><blockquote><strong>Reply:</strong> Yes, and we routinely check in on those options. We’ve benchmarked internal costs versus vendor solutions and identified areas to optimize. For example, we’re evaluating ARM-based runners, ephemeral environments, and usage-based pricing models. We’ve also looked at build-vs-buy tradeoffs to ensure we’re not over-engineering where a vendor tool makes more financial sense.</blockquote><p><strong>How would we know if we’re over-resourced for CI?</strong></p><blockquote><strong>Reply:</strong> Our CI system is designed to scale with our team. While we’ve invested upfront in automation and tooling, that investment reduces manual work and prevents performance bottlenecks. We regularly review usage patterns to ensure we’re not over-provisioning, and we’ve set clear thresholds for scaling resources up or down.</blockquote><h3>Final thoughts</h3><p>CI isn’t just a technical necessity, it’s a vital lever to iterate faster and unlock productivity. Framing your CI spend within the broader goals of innovation, efficiency, and time-to-market helps translate your team’s engineering work into business value.</p><p>When you clearly explain why tools were chosen, what outcomes you’re driving, how your costs compare to targets, and what you’re doing to optimize, you shift the conversation from cost center to value creation. It’s vital to talk your CFO’s language when reviewing your CI performance so you can clearly communicate your wins and highlight what your team is doing to improve engineer velocity more efficiently.</p><h3>Where Depot fits in</h3><p>When it’s time to prove ROI to your CFO, <a href="https://depot.dev/?source=medium">Depot</a> makes the math simple. <a href="https://depot.dev/customers?source=medium">Our customers</a> typically see 2–40x faster builds and cut their CI spend in half, the kind of concrete numbers that finance teams love to see.</p><p>Whether you’re optimizing Docker builds or GitHub Actions workflows, you can show measurable improvements: faster deployments, lower costs per build, and engineers who aren’t waiting around. <a href="https://depot.dev/sign-up?source=medium">Start a free trial</a> and bring real data to your next CFO meeting.</p><p><em>Originally published at </em><a href="https://depot.dev/blog/devops-to-finance-explaining-ci-costs-to-your-cfo"><em>https://depot.dev</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f825079c8a2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/build-performance/devops-to-finance-explaining-ci-costs-to-your-cfo-3f825079c8a2">DevOps to finance: Explaining CI costs to your CFO</a> was originally published in <a href="https://medium.com/build-performance">Build Performance by Depot</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Your CI Pipeline Needs Network Security (And How We Built It)]]></title>
            <link>https://medium.com/build-performance/why-your-ci-pipeline-needs-network-security-and-how-we-built-it-d80b4a416555?source=rss-04be0da00b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/d80b4a416555</guid>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[network]]></category>
            <dc:creator><![CDATA[Depot]]></dc:creator>
            <pubDate>Tue, 10 Jun 2025 21:42:21 GMT</pubDate>
            <atom:updated>2025-06-10T21:42:21.833Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Most CI/CD pipelines have unlimited internet access. That’s a problem.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G12z8_la5BVXWOaIpRgiLQ.png" /></figure><p>When your GitHub Actions runners can connect to any external service, you’re creating a massive attack surface. A compromised dependency, malicious script, or even an honest mistake can lead to data exfiltration or unauthorized access.</p><p>At <a href="https://depot.dev/?utm_source=medium">Depot</a>, we’ve been thinking about this problem while building our managed GitHub Actions runners. Today, we’re sharing how we solved it with egress filtering — and why every CI pipeline should have network controls.</p><h3>The Hidden Security Risk in CI/CD</h3><p>Think about what your CI pipeline can access:</p><ul><li>Your source code and secrets</li><li>Production deployment keys</li><li>Internal APIs and databases</li><li>Third-party services and registries</li></ul><p>Now think about what it can connect to: <strong>everything on the internet.</strong></p><p>That’s the disconnect. Your CI has access to your most sensitive assets, but traditional runners operate with unlimited network access. One malicious npm package or compromised Docker image could exfiltrate your entire codebase.</p><h3>What We Built: Egress Filtering for CI</h3><p>Egress filtering gives you fine-grained control over which external services your CI runners can reach. Instead of unlimited internet access, you define exactly what your builds need.</p><p><strong>How it works:</strong></p><ul><li>Configure allow/deny rules for specific IPs, hostnames, or CIDR blocks</li><li>Set a default policy (allow or deny all unlisted traffic)</li><li>Automatic allowlisting for essential services (GitHub, your registries, etc.)</li><li>Zero changes to your existing workflows</li></ul><p><strong>Example configuration:</strong></p><pre>Default: DENY<br>Allow: api.github.com<br>Allow: registry-1.docker.io<br>Allow: 10.0.0.0/8 (internal services)<br>Deny: *.social-media.com</pre><h3>The Technical Challenge: Making It Actually Work</h3><p>Building network filtering for CI isn’t straightforward. Here are the problems we had to solve:</p><h3>Problem 1: Round-Robin DNS</h3><p>Services like api.github.com return different IP addresses on each DNS lookup. You can’t just allowlist one IP.</p><p><strong>Our solution:</strong> After resolving hostnames in your rules, we write entries to /etc/hosts to ensure consistent IP resolution.</p><h3>Problem 2: Dynamic Infrastructure</h3><p>When you run depot build, our API spins up a new builder with a random AWS IP. We can’t pre-allowlist every possible EC2 IP.</p><p><strong>Our solution:</strong> A background process that listens for new builder IPs and dynamically adds them to the allowlist.</p><h3>Problem 3: Essential Services</h3><p>Runners need to connect to GitHub Actions services, AWS APIs, and other infrastructure. Breaking these would kill your builds.</p><p><strong>Our solution:</strong> Automatic allowlisting for known essential services, with the ability to override if needed.</p><h3>Implementation: iptables + Custom Chain</h3><p>We implemented egress filtering using iptables on Linux runners:</p><ol><li><strong>Create custom chain:</strong> DEPOT_FILTER in the filter table</li><li><strong>Route traffic:</strong> All outbound traffic goes through our custom chain</li><li><strong>Process rules in order:</strong></li></ol><ul><li>Allow loopback traffic (localhost services)</li><li>Apply deny rules first (explicit blocks take precedence)</li><li>Apply allow rules (explicit permits)</li><li>Apply default policy (allow or deny everything else)</li></ul><h3>Real-World Use Cases</h3><p><strong>Lock down production pipelines:</strong> Only allow connections to your specific registries, APIs, and deployment targets.</p><p><strong>Prevent data exfiltration:</strong> Block connections to file-sharing services, social media, or unknown domains.</p><p><strong>Meet compliance requirements:</strong> Many enterprises require network controls for CI/CD accessing sensitive data.</p><p><strong>Secure open source projects:</strong> Prevent supply chain attacks from making unauthorized network connections.</p><h3>What’s Next</h3><p>We’re working on additional features:</p><p><strong>Monitor mode:</strong> See which connections your runners are making without blocking them. Perfect for understanding what your builds actually need before locking things down.</p><p><strong>Windows and macOS support:</strong> Currently Linux-only, but expanding to other platforms.</p><p><strong>Advanced policies:</strong> Time-based rules, conditional access, and integration with external security tools.</p><h3>Why This Matters</h3><p>CI/CD security is often overlooked. Teams focus on securing their applications but leave their build pipelines wide open. As supply chain attacks become more common, network controls for CI aren’t optional — they’re essential.</p><p>Egress filtering gives you security without sacrificing the speed and flexibility that makes CI/CD valuable. Your builds run just as fast, but with dramatically reduced attack surface.</p><h3>Try It Yourself</h3><p>Egress filtering is available now for all <a href="https://depot.dev/products/github-actions?utm_source=medium">Depot GitHub Actions runners.</a> Head to your organization settings to configure rules for your team.</p><p>The future of CI/CD is fast <em>and</em> secure. You shouldn’t have to choose</p><p><em>Originally published at </em><a href="https://depot.dev/blog/now-available-egress-filtering-for-github-actions-runners"><em>https://depot.dev</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d80b4a416555" width="1" height="1" alt=""><hr><p><a href="https://medium.com/build-performance/why-your-ci-pipeline-needs-network-security-and-how-we-built-it-d80b4a416555">Why Your CI Pipeline Needs Network Security (And How We Built It)</a> was originally published in <a href="https://medium.com/build-performance">Build Performance by Depot</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improving EC2 boot time from 4s to 2.8s to accelerate builds]]></title>
            <link>https://medium.com/build-performance/improving-ec2-boot-time-from-4s-to-2-8s-to-accelerate-builds-51c5104acf1d?source=rss-04be0da00b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/51c5104acf1d</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Depot]]></dc:creator>
            <pubDate>Tue, 10 Jun 2025 16:25:51 GMT</pubDate>
            <atom:updated>2025-06-10T16:25:51.214Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AYHH5aI3DN7NgkajQfmlOw.png" /></figure><p>We at <a href="https://depot.dev/?utm_source=medium">Depot</a> like making shit fast, whether that’s Docker image builds, Github Actions runners, Bazel caching, Turborepo, or even <a href="https://depot.dev/blog/github-actions-breaking-five-second-barrier?utm_source=medium">our own infrastructure.</a></p><p>Recently, we’ve been working to make EC2 instances boot faster. Why? Because the faster we can boot an EC2 instance, the faster we can get your build running. We’ve previously tackled other optimizations around this problem like <a href="https://depot.dev/blog/faster-ec2-boot-time?utm_source=medium">warming our EBS volumes</a>, and it’s a fantastic read if you’re looking to make a huge impact on boot times (no bias, of course).</p><p>But this recent round of optimizations brought us down deep into the boot process to analyze what we could remove that is consuming precious milliseconds of boot time. An important thing to note, this article was written with Ubuntu 24.04 in mind. But, the general approach should apply to 22.04 and future versions as well.</p><h3>Analyzing EC2 boot time with systemd-analyze</h3><h3>What is consuming time during boot?</h3><p>Knowing is half the battle. To know what to optimize, we need to know what’s slow. One of the simplest and most powerful tools for this is systemd-analyze. It&#39;s a tool that allows us to view what systemd units are taking the most time to start up.</p><p>It also allows us to see what services are blocking other services from starting up. Let’s start by running the command without arguments:</p><pre>root@depot-machine ~# systemd-analyze<br>Startup finished in 1.784s (kernel) + 6.999s (userspace) = 8.784s<br>graphical.target reached after 6.959s in userspace.</pre><p>This tells us that the kernel took 1.784 seconds to boot, and the userspace took 7 seconds to boot. This is a total of ~8.8 seconds. This is a good starting point, but we want to know more about what is taking so long in userspace.</p><h3>Exploring the critical chain and boot graph</h3><p>To do that, we’ll take advantage of two commands: systemd-analyze critical-chain and systemd-analyze plot. The systemd-analyze critical-chain will show us the critical chain of services that are blocking other services from starting up. While this is incredibly useful for finding large bottlenecks, it doesn&#39;t give us the whole story.</p><p>We also want to know what services are taking the most time to start up. To do that, we’ll use systemd-analyze plot, which generates an SVG that shows us a graph of all the services that are starting up and how long they took to start.</p><p>We also need to know what systemd target we want to optimize for. In our case, we care the most about how long it takes for our network to come up, since that’s the point where you can connect to BuildKit for our Docker image builders or our GitHub Actions runners. Because of that, we’ll be optimizing for the network-online.target. This is the target that is reached when the network is up and running.</p><p>Let’s check the critical-chain and plot for that target:</p><pre>root@depot-machine ~# systemd-analyze critical-chain network-online.target<br>The time when unit became active or started is printed after the “@” character.<br>The time the unit took to start is printed after the “+” character.<br>network-online.target @3.993s<br>└─systemd-networkd-wait-online.service @2.142s +1.848s<br> └─systemd-networkd.service @1.937s +197ms<br> └─network-pre.target @1.927s<br> └─ufw.service @1.898s +27ms<br> └─local-fs.target @1.840s<br> └─run-user-1001.mount @3.380s<br> └─local-fs-pre.target @962ms<br> └─systemd-tmpfiles-setup-dev.service @941ms +19ms<br> └─systemd-tmpfiles-setup-dev-early.service @855ms +80ms<br> └─kmod-static-nodes.service @699ms +98ms<br> └─systemd-journald.socket @634ms<br> └─system.slice @525ms<br> └─-.slice @526ms</pre><pre>root@depot-machine ~# systemd-analyze plot &gt; /tmp/boot.svg</pre><p>This gives us a full view of the services and their time to start to reach the state of network-online. With this in hand, we know where to start looking.</p><p>We see there is 1.8 seconds of kernel boot time and 4 seconds of userspace boot time. We also see that the network-online.target is taking 1.8 seconds to start, which is a good place to start looking.</p><p>We’ll start by going through some of the more generic optimizations we can do, then get more specific and detailed.</p><h3>Improving disk performance at boot</h3><h3>File system optimizations</h3><p>We can begin by looking at our disks, since every service we load is inevitably going to interact with it. Taking a look at our /etc/fstab/ we see the following:</p><pre>root@depot-machine ~# cat /etc/fstab<br>LABEL=cloudimg-rootfs / ext4 discard,commit=30,errors=remount-ro 0 1<br>LABEL=BOOT /boot ext4 defaults 0 2<br>LABEL=UEFI /boot/efi vfat umask=0077 0 1</pre><p>It looks like we’re running ext4 on both our root and boot disks. There are a ton of options for how the kernel interacts with ext4, so it can be difficult to know where to start.</p><p>Thankfully, the <a href="https://wiki.archlinux.org/title/Ext4#Improving_performance">Arch Linux wiki</a> provides an excellent starting point. The first thing we can do is disable access time updates. This is a feature that updates the last access time of a file every time it’s read. This can be useful for a small percentage of applications, but for most running on an ephemeral runner, it’s not necessary. We can disable this by adding the noatime option to our fstab entry for the root and boot disks:</p><pre>root@depot-machine ~# cat /etc/fstab<br>LABEL=cloudimg-rootfs / ext4 discard,commit=30,errors=remount-ro,noatime 0 1<br>LABEL=BOOT /boot ext4 defaults,noatime 0 2<br>LABEL=UEFI /boot/efi vfat umask=0077 0 1</pre><p>Now, let’s check in on our old friend systemd-analyze and see if this has made any difference:</p><pre>root@depot-machine ~# systemd-analyze critical-chain network-online.target<br>The time when unit became active or started is printed after the “@” character.<br>The time the unit took to start is printed after the “+” character.<br>network-online.target @3.765s</pre><p>This has saved us a pretty decent 200ms! For those of you with a keen eye, you’ll notice that our Github Actions runners already have the discard and commit options set. Both help to improve disk performance.</p><p>There are also options like setting barrier to 0 or disabling journaling, which could help to improve write performance. However, as these options wouldn&#39;t necessarily help improve boot times, where read performance is more important, we skip those for now.</p><blockquote><strong><em>As an aside:</em></strong><em> </em><em>rclone mount is incredibly useful for editing files on many remote file systems, including SSH servers. By setting the </em><em>--vfs-cache-mode writes option, you can edit files on the remote server as if they were local. I use it throughout the article to edit files on this EC2 instance.</em></blockquote><h3>Disable fsck as ephemeral build machines don’t need it</h3><p>The next thing we can do is skip fsck when booting. This is a feature that checks the file system for errors before booting. This is useful for some systems, but again, ephemeral machines like these don&#39;t care about things like disk corruption 🙂. We can do this by adding the fsck.mode=skip option to our grub config:</p><pre>root@depot-machine ~# cat /boot/efi/EFI/ubuntu/grub.cfg<br>terminal_input console<br>terminal_output console<br>set menu_color_normal=white/black<br>set menu_color_highlight=black/light-gray<br>insmod gzio<br>insmod part_gpt<br>insmod lvm<br>insmod ext2<br>search — no-floppy — label — set=root BOOT<br>linux /vmlinuz root=LABEL=cloudimg-rootfs mitigations=off audit=0 pci=nocrs nvme_core.io_timeout=4294967295 nopti console=ttyS0 fsck.mode=skip<br>initrd /microcode.cpio /initrd.img<br>boot</pre><p>Then, all we need to do is run update-grub to apply the changes.</p><p>This isn’t the only place we run fsck, however. Taking a look at the plot SVG from earlier, you&#39;ll notice that systemd also runs fsck while booting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*UGDgNv8Kioa9c1lBaA12Lw.png" /><figcaption>systemd runs fsck while booting</figcaption></figure><p>This is a service that runs fsck on all of the disks before booting. We can disable this by masking this service:</p><pre>systemctl mask systemd-fsck-root.service</pre><p>Notably, the initramfs is the program that checks the file system for grub, so we&#39;ll need to check both kernel and userspace start times:</p><pre>root@depot-machine ~# systemd-analyze<br>Startup finished in 1.533s (kernel) + 6.484s (userspace) = 8.018s<br>graphical.target reached after 5.277s in userspace.</pre><p>This is a pretty small but notable improvement from where we started!</p><h3>Removing snaps to reduce boot overhead</h3><p>Snaps are a package management system created by Canonical, designed to be cross-distro and easy to install without having to worry about dependency management. They’re also the bane of anyone who cares about boot times.</p><p>Their cold start times are very slow; due to a combination of decompressing an entire squashfs file system, mounting said file system, and loading in every dependency of the snap. You can read a little more about this <a href="https://forum.snapcraft.io/t/squashfs-performance-effect-on-snap-startup-time/13920">here</a>.</p><p>As you can see, snaps take up a lot of boot time! Even with each snap mounting in parallel, it takes around 30 milliseconds to mount the squashfs, and 300 milliseconds to get the loop back devices ready!</p><p>Each snap mounts a squashfs file system at boot, so removing all snaps should help to improve boot times. Let’s take a look at what snaps we have installed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*UXsz6DSB3HCPHQLstbejuQ.png" /><figcaption>Checking what snaps are installed</figcaption></figure><pre>root@depot-machine ~# snap list<br>Name Version Rev Tracking Publisher Notes<br>amazon-ssm-agent 3.3.987.0 9881 latest/stable/… aws✓ classic<br>core22 20250210 1802 latest/stable canonical✓ base<br>snapd 2.67.1 23771 latest/stable canonical✓ snapd</pre><p>This lines up with what we’re seeing in the plot. The core22 snap is the base for all snaps, and snapd is of course the snap daemon. We also need the amazon-ssm-agent snap, since it’s used to connect to the EC2 instance for this example.</p><p>What we can do in this case is install the amazon-ssm agent as a regular deb package. That way, we can remove all snaps and still have the agent installed:</p><pre>snap remove amazon-ssm-agent<br>curl -LO https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/debian_amd64/amazon-ssm-agent.deb<br>sudo dpkg -i amazon-ssm-agent.deb</pre><p>This will remove the snap and install the deb package. This is a pretty small change, but it should help to improve boot times a little bit. Next, we can remove the core22 and snapd packages, since we don’t need them. Since there won’t be any snaps to mount at boot, this should save us around 300 milliseconds:</p><pre># remove all core<br>snap list — all | grep -v ‘snapd’ | awk ‘NR&gt;1 {print $1}’ | xargs -I{} snap remove {}<br># remove snapd<br>snap list — all | awk ‘NR&gt;1 {print $1}’ | xargs -I{} snap remove {}<br>root@depot-machine ~# systemd-analyze<br>Startup finished in 1.429s (kernel) + 5.405s (userspace) = 6.834s<br>graphical.target reached after 5.385s in userspace.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*DK3ta12zsIrUGqjDw4wovQ.png" /><figcaption>apparmor service time to start</figcaption></figure><p>As you can see, the loop device mounting is gone! However, problems still remain: Taking a look at the plot again, apparmor is taking around 400 ms to start:</p><h3>Handling AppArmor and on-demand snap services</h3><p>App Armor is a security module for the kerne that helps to restrict what programs can do. In this case, it’s used by snaps for permissions. While this is an important security consideration for regular servers, however, we have a different security posture when it comes to ephemeral machines like ours. One way we can approach this is to disable the apparmor service, but start it automatically when snap or other applications ask for it:</p><pre># first, disable snap and app armor<br>systemctl disable snapd.socket<br>systemctl disable snapd.service<br>systemctl disable snapd.seeded.service<br>systemctl disable snapd.apparmor.service<br>systemctl disable apparmor.service<br># Create a systemd socket unit that will listen and activate the service when needed<br>cat &gt; /etc/systemd/system/snapd-on-demand.socket &lt;&lt; EOF<br>[Unit]<br>Description=Socket activation for snapd service<br>[Socket]<br>ListenStream=/run/snapd.socket<br>SocketMode=0666<br>[Install]<br>WantedBy=sockets.target<br>EOF<br># Create the corresponding service that will be started on-demand<br>cat &gt; /etc/systemd/system/snapd-on-demand.service &lt;&lt; EOF<br>[Unit]<br>Description=Snap Daemon (on-demand)<br>After=network.target<br>Requires=snapd.apparmor.service apparmor.service<br>[Service]<br>ExecStart=/usr/lib/snapd/snapd<br>Type=simple<br>[Install]<br>WantedBy=multi-user.target<br>EOF<br>systemctl daemon-reload<br>systemctl enable — -now snapd-on-demand.socket</pre><h3>Disabling unnecessary systemd services</h3><p>Since we’re deep in the world of systemd anyways, I have a lightning round list of services we can disable to help improve boot times. These are all services that are either not needed or can be started on-demand:</p><ul><li>systemctl mask systemd-journal-flush.service: takes a ridiculous 5 seconds to start, and we don&#39;t need to worry about the journal disappearing on an ephemeral machine.</li><li>systemctl mask lvm2-monitor.service: this service monitors Logical Volume Management (LVM) devices for changes. We use a static LVM config, so this has no benefit</li><li>systemctl mask multipathd.service: the multipath daemon manages redundant physical paths to storage devices. Since we don&#39;t use multipath storage, this service is unnecessary and can be safely disabled.</li><li>systemctl mask multipathd.socket</li></ul><h3>Userspace-level unnecessary systemd services</h3><p>While figuring out why systemd-networkd-wait-online was taking so long, I learned about an OS feature called <a href="https://www.ibm.com/support/pages/what-duplicate-address-detection">duplicate address detection</a>. It effectively does what it sounds like, it verifies that IPv6 home addresses are unique on the local link before assigning them to an interface.</p><p>While it can be incredibly useful for some servers, it’s likely <a href="https://www.agwa.name/blog/post/beware_the_ipv6_dad_race_condition">only harming</a> your boot times on cloud instances. Disabling it with systemd is pretty straightforward. This will disable IPv6 duplicate address detection for all network interfaces:</p><pre>mkdir -p /etc/systemd/network/10-netplan-pseudo.network.d<br>echo -e &#39;[Network]\nIPv6DuplicateAddressDetection=0\n&#39; &gt;&gt;<br>/etc/systemd/network/10-netplan-pseudo.network.d/override.conf</pre><p>Another check of our boot times:</p><pre>root@depot-machine ~# systemd-analyze critical-chain network-online.target<br>The time when unit became active or started is printed after the “@” character.<br>The time the unit took to start is printed after the “+” character.<br>network-online.target @2.779s<br>└─systemd-networkd-wait-online.service @1.914s +861ms<br> └─systemd-networkd.service @1.579s +327ms<br> └─network-pre.target @1.571s<br>…</pre><p>That’s another 600 ms shaved off our times!</p><h3>Removing cloud-init and replacing with static netplan</h3><p>Another userspace optimization is to disable a feature called <a href="https://cloudinit.readthedocs.io/en/latest/index.html">cloud-init</a>. It queries Amazon’s metadata service to automatically set the host name and configure networks. While this is useful for some systems, it’s just not necessary in our case, and adds to the boot time. We can also automatically configure our netplan config so that cloud-init is unnecessary:</p><pre># /etc/netplan/50-cloud-init.yaml<br>network:<br> ethernets:<br> pseudo:<br> optional: true<br> dhcp4: true<br> dhcp6: false<br> accept-ra: false<br> mtu: 1500<br> match:<br> name: en*<br> version: 2</pre><p>We’ve been giving systemd so much love that we’ve barely tackled other parts of boot! One area to claw back milliseconds from is the initramfs. It handles setting up devices on the system before deferring over to the rest of the boot process. We discovered that the initramfs was doing quite a bit of work involving udev rules, and made sure to remove any rules in /usr/lib/udev/rules.d/ that weren&#39;t necessary for boot, such as 66-azure-ephemeral.rules.</p><h3>Where we’re looking to optimize next</h3><p>We managed to improve our boot times from 4 seconds to 2.8 seconds focusing on the detailed optimizations above.</p><p>But we’re always looking for the next few milliseconds we can squeeze out. We have some theories around where we are going to look next after this most recent optimization round.</p><h3>Kernel boot time: What’s still taking 1.7 seconds?</h3><p>For most of this article, we barely dug into the ~1.7 seconds of kernel boot time.</p><p>There’s a number of ways to approach this, but a relatively easy one is compiling the kernel with different flags. Every module compiled into the kernel adds boot time, whether from loading the bytes from that module from the disk, preparing and activating the module, or loading it dynamically as needed by userspace applications.</p><p>If you know which modules you can do without, compiling them out isn’t too tedious of a task.</p><h3>Mo initramfs, mo problems</h3><p>We took our first pass at optimizing initramfs, but we only scratched the surface there with our basic rule disabling. The reality is that initramfs does quite a bit of work during boot, including setting up devices, loading modules, etc. We think there are additional opportunities to optimize this further, maybe even booting the kernel <a href="https://firasuke.github.io/DOTSLASHLINUX/post/booting-the-linux-kernel-without-an-initrd-initramfs/">without </a><a href="https://firasuke.github.io/DOTSLASHLINUX/post/booting-the-linux-kernel-without-an-initrd-initramfs/">initramfs at all</a>.</p><h3>FIN</h3><p>We’ve managed to improve boot times by focusing heavily on the OS side of things, implementing common advice like setting noatime, all the way up to entirely removing snap and cleaning up udev rules. This is just a fraction of the work we&#39;ve been doing at Depot to help get your builds running even faster.</p><p>If you want to see how smoothly Depot fits into your workflow, check out our <a href="https://depot.dev/integrations?utm_source=medium">integrations</a>. Or if you’re ready to try it yourself, <a href="https://depot.dev/sign-up?utm_source=medium">get started here.</a></p><p><em>Originally published at </em><a href="https://depot.dev/blog/accelerating-builds-improve-ec2-boot-time"><em>https://depot.dev</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51c5104acf1d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/build-performance/improving-ec2-boot-time-from-4s-to-2-8s-to-accelerate-builds-51c5104acf1d">Improving EC2 boot time from 4s to 2.8s to accelerate builds</a> was originally published in <a href="https://medium.com/build-performance">Build Performance by Depot</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why platform teams are focused on CI/CD optimization]]></title>
            <link>https://medium.com/build-performance/why-platform-teams-are-focused-on-ci-cd-optimization-1df12fa1b9e3?source=rss-04be0da00b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/1df12fa1b9e3</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <dc:creator><![CDATA[Depot]]></dc:creator>
            <pubDate>Mon, 09 Jun 2025 14:12:04 GMT</pubDate>
            <atom:updated>2025-06-09T14:12:04.852Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*soM4W7-NqBd_7FkeGL_b9Q.png" /></figure><p>New data shows 71% of platform engineering teams are prioritizing CI/CD optimization. Mid-sized orgs lead the charge, and for good reason, slow builds are still one of the biggest blockers to developer productivity.</p><p>71% of platform engineering teams say streamlining CI/CD pipelines is their top priority. That number climbs to 85% for mid-sized organizations, with large companies not far behind.</p><p>It tracks. The more mature the platform effort, the more painful slow builds become.</p><p>Meanwhile, platform engineering itself is gaining traction. 67% of organizations have either adopted it or are actively exploring it. As more teams shift away from scattered DevOps tooling, a clear pattern is emerging: CI/CD performance is where platform work starts.</p><h3>The platform engineering revolution</h3><p>Platform engineering has emerged as the discipline that bridges the gap between DevOps and developer productivity. While DevOps often pushes infrastructure responsibility onto developers, platform teams are building internal platforms that handle complexity behind the scenes so developers can stay focused on shipping.</p><p>Instead of every team owning their own Terraform scripts, CI pipelines, and environment configs, platform teams provide shared infrastructure that works out of the box. They standardize tooling, abstract away low-level decisions, and give teams a paved path to production that is fast, reliable, and secure.</p><p>The goal isn’t to slow developers down with more processes. It’s to give them fewer things to worry about and to fix the bottlenecks that tooling alone hasn’t solved.</p><h3>Why CI/CD became priority #1</h3><h3>Developers Are Spending Hours Waiting for Builds</h3><p>The average Docker build now takes 5–15 minutes. Multiply that by several deploys a day, and developers can easily lose 30 to 45 minutes waiting, <em>every single day</em>. Across a team, that adds up fast.</p><p>The impact isn’t just time lost. Slow builds impact everything:</p><ul><li><a href="https://depot.dev/blog/how-to-calculate-github-actions-usage">GitHub Actions bills</a> scale with team size</li><li>Productivity drops</li><li>Build wait times are the top complaint in developer experience surveys</li></ul><p>Platform engineering teams recognize this as an infrastructure problem, not a process problem.</p><h3>Most teams already did the easy stuff</h3><p>Basic automation is table stakes now. The real challenge is infrastructure-level optimization. Moving beyond “it works” to “it works fast.” And that requires treating builds differently.</p><h3>The platform engineering approach: Builds are infrastructure</h3><p>Platform engineers understand that build performance is an infrastructure concern. Just as you wouldn’t accept slow database queries, slow builds represent an infrastructure bottleneck.</p><ul><li><strong>Traditional thinking:</strong> “Builds are just part of development”</li><li><strong>Platform engineering thinking:</strong> “Builds are critical infrastructure”</li></ul><p>This shift changes everything. Instead of asking each dev team to optimize their own builds, platform teams provide centralized build acceleration as a service.</p><h3>What this actually looks like</h3><p>Smart platform teams treat build infrastructure with the same rigor as production infrastructure:</p><ul><li>Standardized build environments across all projects</li><li>Performance monitoring and alerting for build pipelines</li><li>Cost tracking and optimization at the infrastructure level</li></ul><p>The key insight: platform teams track build performance as a core developer experience metric, not an afterthought.</p><h3>Enter Depot: Build infrastructure that actually works</h3><p>Here’s where most platform engineering initiatives hit a wall. You can standardize configs and add monitoring, but you still need infrastructure that’s actually fast.</p><p>Depot provides the build acceleration layer that makes platform engineering CI/CD strategies work:</p><h3>Infrastructure that performs</h3><ul><li>4x faster builds through optimized compute and caching</li><li>Instant runner startup vs 2–5 minute <a href="https://depot.dev/products/github-actions">GitHub runner</a> boot times</li><li>99.9% uptime SLA because builds are production infrastructure</li></ul><h3>Integration that makes sense</h3><ul><li>One-line config change: runs-on: depot-ubuntu-4x</li><li>API-driven management for programmatic configuration</li><li>Per-second billing with detailed cost analytics</li></ul><h3>Developer experience that doesn’t suck</h3><ul><li>Zero workflow changes for dev teams</li><li>Automatic optimization without developer intervention</li><li>Clear performance metrics and cost visibility</li></ul><h3>What success looks like</h3><p>Teams that treat build performance as infrastructure see dramatic improvements. Not just in build times, but in deployment frequency, developer satisfaction, and infrastructure costs.</p><p>The question isn’t whether to optimize CI/CD pipelines. It’s how quickly you can implement infrastructure-grade build acceleration.</p><p>Because 71% of platform engineering teams are already working on this. The ones who get it right first will have a significant competitive advantage.</p><p>If you’re ready to make that shift, Depot is built for it. <a href="https://depot.dev/sign-up">Give it a try.</a></p><p><em>Originally published at </em><a href="https://depot.dev/blog/why-platform-teams-are-focused-on-ci-cd-optimization"><em>https://depot.dev</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1df12fa1b9e3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/build-performance/why-platform-teams-are-focused-on-ci-cd-optimization-1df12fa1b9e3">Why platform teams are focused on CI/CD optimization</a> was originally published in <a href="https://medium.com/build-performance">Build Performance by Depot</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to calculate your real GitHub Actions usage in minutes]]></title>
            <link>https://medium.com/build-performance/how-to-calculate-your-real-github-actions-usage-in-minutes-d6b70937775e?source=rss-04be0da00b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6b70937775e</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[developer-productivity]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[cicd]]></category>
            <dc:creator><![CDATA[Depot]]></dc:creator>
            <pubDate>Wed, 04 Jun 2025 00:56:36 GMT</pubDate>
            <atom:updated>2025-06-04T00:56:36.351Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5BRr8ZIT2Ks86RujpeeAQw.png" /></figure><p>GitHub Actions usage reporting doesn’t tell the full story. If you’re running different types of runners (like 4-core, 8-core, or more), those minutes aren’t equal, and your total usage number doesn’t reflect it.</p><p>GitHub Actions usage reporting doesn’t tell the full story. If you’re running different types of runners (like 4-core, 8-core, or more), those minutes aren’t equal, and your total usage number doesn’t reflect it.</p><p>This guide will show you how to:</p><ul><li>Export your raw usage data</li><li>Normalize it by runner type</li><li>Get an accurate total you can actually budget against \</li></ul><h3>Why normalizing GitHub Actions minutes matters</h3><p>Runner types in <a href="https://depot.dev/products/github-actions?utm_source=medium">GitHub Actions</a> have different compute capacities and costs. For example, a 4-core runner can do twice the work of a 2-core runner. If you just sum the raw usage, you’re underestimating your real consumption and leaving yourself open to surprise bills.</p><h3>Step 1: Export your usage report</h3><ol><li>In GitHub, click your avatar (top right) and go to <strong>Settings</strong></li><li>Select <strong>Billing and plans</strong></li><li>Under <strong>Usage this month</strong>, click <strong>Get usage report</strong></li><li>Choose your date range (30/60/90 days) and download the CSV</li></ol><p>You’ll now have a CSV showing runner types, quantities, and costs.</p><h3>Step 2: Normalize your minutes</h3><p>Open the CSV in any spreadsheet tool. Focus on the ‘sku’ and ‘quantity’ columns. Each runner type has a multiplier based on its compute capacity:</p><p>To normalize your total usage:</p><ul><li>For each runner type, multiply the quantity by the multiplier</li><li>Sum these normalized values across all runner types</li></ul><p>This gives you the total compute-equivalent minutes your team used during the period.</p><h3>Step 3: Use the data to control costs</h3><p>Without normalized data, you’re likely underestimating usage. This normalization process gives you a real number to track, budget against, and compare over time.</p><h3>Take it further with Depot</h3><p>Once you know how many minutes you’re actually burning, the next step is cutting them down. Depot Runners can dramatically speed up your CI builds, reducing both time and cost.</p><p>If you’re ready to stop guessing and start saving, give <a href="https://depot.dev/?utm_source=medium">Depot</a> a try.</p><p><em>Originally published at </em><a href="https://depot.dev/blog/how-to-calculate-github-actions-usage"><em>https://depot.dev</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6b70937775e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/build-performance/how-to-calculate-your-real-github-actions-usage-in-minutes-d6b70937775e">How to calculate your real GitHub Actions usage in minutes</a> was originally published in <a href="https://medium.com/build-performance">Build Performance by Depot</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Faster Claude Code agents in GitHub Actions]]></title>
            <link>https://medium.com/build-performance/faster-claude-code-agents-in-github-actions-fbe72d76e36c?source=rss-04be0da00b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbe72d76e36c</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Depot]]></dc:creator>
            <pubDate>Tue, 03 Jun 2025 14:49:38 GMT</pubDate>
            <atom:updated>2025-06-03T14:49:38.487Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zD3JjQaJ3m40xSLybcu2FA.png" /></figure><p>A crash course into the new ability to run Claude Code agents in GitHub Actions and how to make them faster with Depot runners.</p><p>It’s been an exciting week as the news starts rolling in about bringing agentic coding out of the IDE and your own terminal and into other parts of our development workflows. Anthropic has brought my favorite agentic coding interaction, Claude Code, to GitHub Actions.</p><p>This means that we can now use Claude Code to write and run code by simply asking Claude in pull requests and issues. Behind the scenes, Claude Code runs inside of GitHub Actions workflows that we control, making it easier to automate tasks and improve our development processes.</p><p>In this post, we’re going to explore how to use Claude Code in GitHub Actions and how to make it even faster and cheaper with the power of Depot GitHub Actions runners.</p><h3>What is Claude Code?</h3><p>Claude Code is an agentic coding tool that lives in your terminal and has a deep understanding of your codebase. It can help you code faster by giving it specific prompts to go work on in the background. Until now, it’s been limited to running on your local machine as the only supported path. However, others have been working on bringing it to more places, like GitHub Actions.</p><p>But now, an official Claude Code GitHub App and an official GitHub Action make it even easier to use Claude Code in your GitHub Actions workflows. This is a game changer, as it allows you to use GitHub Actions as a background automation platform. Multiple Claude Code agents work on your codebase in parallel, processing different tasks simultaneously, significantly speeding up your development process.</p><h3>Configuring Claude Code in GitHub Actions</h3><p>To get started, it’s recommended that you install the official GitHub app for Claude. This app allows you to tag @claude in your issues and PRs with a specific prompt to go work on.</p><p>Installing the app can actually be done directly from claude in your terminal:</p><pre>claude /install-github-app</pre><p>This installs the GitHub App to your repository, adds your Anthropic API key as a secret, and configures a workflow in .github/workflows/claude.yml that looks like this:</p><pre>name: Claude Code<br>on:<br>  issue_comment:<br>    types: [created]<br>  pull_request_review_comment:<br>    types: [created]<br>  issues:<br>    types: [opened, assigned]<br>  pull_request_review:<br>    types: [submitted]<br>jobs:<br>  claude:<br>    if: |<br>      (github.event_name == &#39;issue_comment&#39; &amp;&amp; contains(github.event.comment.body, &#39;@claude&#39;)) ||<br>      (github.event_name == &#39;pull_request_review_comment&#39; &amp;&amp; contains(github.event.comment.body, &#39;@claude&#39;)) ||<br>      (github.event_name == &#39;pull_request_review&#39; &amp;&amp; contains(github.event.review.body, &#39;@claude&#39;)) ||<br>      (github.event_name == &#39;issues&#39; &amp;&amp; (contains(github.event.issue.body, &#39;@claude&#39;) || contains(github.event.issue.title, &#39;@claude&#39;)))<br>    runs-on: ubuntu-latest<br>    permissions:<br>      contents: read<br>      id-token: write<br>    steps:<br>      - name: Checkout repository<br>        uses: actions/checkout@v4<br>        with:<br>          fetch-depth: 1<br>      - name: Run Claude Code<br>        id: claude<br>        uses: anthropics/claude-code-action@beta<br>        with:<br>          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}</pre><p>Once you’ve installed this, you must merge in the pull request Claude opens before you can use it.</p><h3>Current gotchas</h3><p>Because this is a beta action, things are very much in flux and under development. There are a few things to note:</p><ol><li>You will need to make sure you have the GitHub CLI installed (i.e., gh) before you run the install command.</li><li>If you get Couldn&#39;t install GitHub App: gh: Not Found (HTTP 404) when running /install-github-app, it means that your local gh auth token doesn&#39;t have workflow permissions (i.e., it can&#39;t create the new claude.yml workflow). You can fix this by running gh auth refresh -h github.com -s workflow and then re-running the /install-github-app command.</li><li>The default tools in the action are pretty tightly scoped. They are listed below, and anything you add to allowed_tools will be appended to the end of this list:</li></ol><ul><li>Edit</li><li>Glob</li><li>Grep</li><li>LS</li><li>Read</li><li>Write</li><li>mcp__github_file_ops__commit_files</li><li>mcp__github_file_ops__delete_files</li><li>mcp__github__update_issue_comment</li></ul><h3>Having Claude Code open pull requests after completing tasks</h3><p>The initial example workflows are heavily focused on running Claude Code to tag issues, add comments to issues, and add pull request reviews. This is great, but it doesn’t really take advantage of the full power of Claude Code.</p><p>One of the things I’m most excited about is the ability to have Claude Code open pull requests after completing tasks. This is a great way to automate getting code changes reviewed and merged into your codebase.</p><p>To do this, you must update the permissions section of the workflow to include pull-request: write, so Claude can open pull requests. You must also include mcp__github__create_pull_request in the allowed_tools input.</p><p>Here is what the Claude Code workflow looks like with these changes:</p><pre>name: Claude Code<br>on:<br> issue_comment:<br> types: [created]<br> pull_request_review_comment:<br> types: [created]<br> issues:<br> types: [opened, assigned]<br> pull_request_review:<br> types: [submitted]<br>jobs:<br> claude:<br> if: |<br> (github.event_name == ‘issue_comment’ &amp;&amp; contains(github.event.comment.body, ‘@claude’)) ||<br> (github.event_name == ‘pull_request_review_comment’ &amp;&amp; contains(github.event.comment.body, ‘@claude’)) ||<br> (github.event_name == ‘pull_request_review’ &amp;&amp; contains(github.event.review.body, ‘@claude’)) ||<br> (github.event_name == ‘issues’ &amp;&amp; (contains(github.event.issue.body, ‘@claude’) || contains(github.event.issue.title, ‘@claude’)))<br> runs-on: ubuntu-latest<br> permissions:<br> contents: read<br> id-token: write<br>+ pull-requests: write<br> steps:<br> — name: Checkout repository<br> uses: actions/checkout@v4<br> with:<br> fetch-depth: 1<br> — name: Run Claude Code<br> id: claude<br> uses: anthropics/claude-code-action@beta<br> with:<br> anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}<br>+ allowed_tools: ‘mcp__github__create_pull_request’</pre><p>With that change, you can now tag @claude in your issues to have it open a pull request for the changes it made. Here is an example from our open-source docs repository, <a href="https://github.com/depot/docs">depot/docs</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/0*YB3FqJBbZTJKkRPf.png" /><figcaption>Claude Code opens pull request</figcaption></figure><h3>Speeding up Claude Code with Depot GitHub Actions runners</h3><p>What’s particularly cool about Anthropic making agentic coding backed by GitHub Actions is that it allows you to control where you want the Claude Code agent to run. This means that you can use Depot GitHub Actions runners to run Claude Code in a much faster environment than the default GitHub-hosted runners.</p><p>We’ve built out our GitHub Actions runners to have faster CPUs, ramdisks with faster IO, and network speeds that make caching exponentially faster. They are also half the cost of GitHub-hosted runners, meaning you can run your Claude Code agents for a fraction of the cost.</p><p>To move a Claude Code agent to run on Depot GitHub Actions runners, just update the runs-on section of the workflow to use depot-ubuntu-latest instead of ubuntu-latest. Here is what the updated workflow looks like:</p><pre>name: Claude Code<br>on:<br>  issue_comment:<br>    types: [created]<br>  pull_request_review_comment:<br>    types: [created]<br>  issues:<br>    types: [opened, assigned]<br>  pull_request_review:<br>    types: [submitted]<br>jobs:<br>  claude:<br>    if: |<br>      (github.event_name == &#39;issue_comment&#39; &amp;&amp; contains(github.event.comment.body, &#39;@claude&#39;)) ||<br>      (github.event_name == &#39;pull_request_review_comment&#39; &amp;&amp; contains(github.event.comment.body, &#39;@claude&#39;)) ||<br>      (github.event_name == &#39;pull_request_review&#39; &amp;&amp; contains(github.event.review.body, &#39;@claude&#39;)) ||<br>      (github.event_name == &#39;issues&#39; &amp;&amp; (contains(github.event.issue.body, &#39;@claude&#39;) || contains(github.event.issue.title, &#39;@claude&#39;)))<br>-    runs-on: ubuntu-latest<br>+    runs-on: depot-ubuntu-latest<br>    permissions:<br>      contents: read<br>      id-token: write<br>      pull-requests: write<br>    steps:<br>      - name: Checkout repository<br>        uses: actions/checkout@v4<br>        with:<br>          fetch-depth: 1<br>      - name: Run Claude Code<br>        id: claude<br>        uses: anthropics/claude-code-action@beta<br>        with:<br>          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}<br>          allowed_tools: &#39;mcp__github__create_pull_request&#39;</pre><p>But you can also tune this further with any of our runner types. For example, we have a small runner with only 2 cores, 2 GB of RAM, and 100 GB of disk at just <strong>$0.002/minute</strong>. This is an excellent option for running Claude Code agents doing small tasks that don&#39;t require a lot of resources. This runner type costs <strong>$0.01/session</strong> on Depot GitHub Actions runners.</p><ul><li><strong>Save money</strong>: Running Claude on Depot runners costs half what you’d pay on GitHub-hosted runners. If you’re pinching pennies, our small runners drop the price to just $0.01 per session for simple tasks.</li><li><strong>Speed things up</strong>: Depot’s faster CPUs, RAM disks, and network make everything run smoother. Your AI agents will thank you.</li><li><strong>Get more done</strong>: With Claude agents handling routine stuff in parallel, your team can focus on the interesting problems instead of the boring ones.</li><li><strong>Super simple setup</strong>: You’re good to go with a few tweaks to your YAML file. No complex configuration needed.</li></ul><p>This whole “AI agents in CI” thing is still pretty new, but is clearly where some portion of development is heading. The coolest part is how easy it is to set up — install the Claude GitHub App, add those permissions for PR creation, and switch to depot-ubuntu-latest. That’s literally it.</p><p>I’m really excited to see what people build with this setup. Having multiple Claude agents working on different parts of your codebase while running on faster and cheaper infrastructure feels like a glimpse into the future of development.</p><p>Want to try it yourself? <a href="https://depot.dev/sign-up">Sign up for a 7-day free trial of Depot</a> and get access to all our build performance for GitHub Actions, Docker, Bazel, Turborepo, Gradle, and much more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/0*oYLgNHl0DReXANEk.jpeg" /></figure><p><em>Originally published at </em><a href="https://depot.dev/blog/claude-code-in-github-actions"><em>https://depot.dev</em></a><em>.</em></p><p>Author: Kyle Galbraith | CEO &amp; Co-Founder of Depot</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbe72d76e36c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/build-performance/faster-claude-code-agents-in-github-actions-fbe72d76e36c">Faster Claude Code agents in GitHub Actions</a> was originally published in <a href="https://medium.com/build-performance">Build Performance by Depot</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>