Repository navigation
Home
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.
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/<owner>/<repo>/<name>:<tag>"]
X["Extra registries"]
end
commit --> ci --> result
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.
| 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 |
- Create a repository from this template.
- If the repository is private or internal, add the
REPO_CLONER_TOKENsecret. - Add your
rockcraft.yaml(and, ideally, aspread.yamlwith tests) at the repository root. See Defining your rock for information on what to include there. - Smoke test locally with
rockcraft pack. - Commit and push. The rock pipeline runs automatically; on
mainit 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.