Skip to content
Alex Santisteban edited this page Oct 21, 2026 · 7 revisions

Welcome to the rocks-template documentation.

This repository template gives you a ready-to-use GitHub repository for developing a rock (an OCI image built with Rockcraft). It includes GitHub Actions workflows that validate, build, test, publish and continuously scan your rocks, so that you only have to provide the rock's definition and its tests.

How it works

flowchart LR
    subgraph commit["You commit"]
        direction TB
        R["rockcraft.yaml"]
        S["spread.yaml (tests)"]
        C[".github/ci.yaml"]
    end

    subgraph ci["rocks-template CI"]
        direction TB
        P["Rock pipeline<br/>Validate → Build → Test → Upload<br/>(every push/PR; upload only on main)"]
        T["Threat monitor<br/>(daily vulnerability scan)"]
    end

    subgraph result["Result"]
        direction TB
        G["ghcr.io/&lt;owner&gt;/&lt;repo&gt;/&lt;name&gt;:&lt;tag&gt;"]
        X["Extra registries"]
    end

    commit --> ci --> result
Loading

The workflows in your repository are thin wrappers around reusable workflows from canonical/rocks-actions. Their behaviour is controlled by a single file, .github/ci.yaml.

Where to start

I want to... Read
Create my first rock repository Getting started
Understand what is in the template and where my files go Repository layout
Write the rockcraft.yaml and build it locally Defining your rock
Add and run tests for my rock Testing your rock
Know what the CI does and when CI pipeline
Change what the CI builds or publishes CI configuration reference
Publish to Docker Hub, ECR or another registry Publishing to registries
Build rocks with Ubuntu Pro services Ubuntu Pro rocks
Understand the daily CVE scan Vulnerability scanning
Configure tokens and secrets Secrets and permissions
Update the pinned workflows Maintaining your repository
Fix a failing pipeline Troubleshooting

Quick start

  1. Create a repository from this template.
  2. If the repository is private or internal, add the REPO_CLONER_TOKEN secret.
  3. Add your rockcraft.yaml (and, ideally, a spread.yaml with tests) at the repository root. See Defining your rock for information on what to include there.
  4. Smoke test locally with rockcraft pack.
  5. Commit and push. The rock pipeline runs automatically; on main it publishes the rock to GHCR.

Note

The template ships without a rock. Until a rockcraft.yaml exists in a directory listed in .github/ci.yaml, the build, test and upload stages are skipped with a warning rather than failing.

Clone this wiki locally