Snapshot enhancements for Depot CI
Snapshots in Depot CI let you bake setup steps into a reusable custom image, so later jobs start from a prepared environment instead of repeating the same work. This release brings a few improvements.
-
Persist environment variables: Snapshots now persist non-sensitive environment variables, so configuration you set during the snapshot job is there when later jobs run. Sensitive and masked variables remain excluded.
-
Faster registry throughput: Pushing a snapshot to the registry is much faster. We raised the throughput from 30 Mbps to 1 Gbps.
-
Provenance:: Every snapshot now carries provenance information as annotations. This helps to answer questions such as which run built it and what the workflow looked like.
-
Create and reuse images in a single workflow:: Add
snapshot:to a job to create one. The first run builds the snapshot; later runs reuse it and skip the snapshot job. Combine it withneeds:to build a snapshot before the job that depends on it. You can also use image shorthands likee2e-base, which expands to{orgId}.registry.depot.dev/depot/snapshots/e2e-base:latest.
jobs:
setup:
runs-on: depot-ubuntu-latest
snapshot: your-image:v1
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y your-tool-here
work:
needs: setup
runs-on:
image: your-image
steps:
- uses: actions/checkout@v4
- run: your-tool-here do-the-thingSee the custom images guide for the full details.