Repository navigation
Getting started
This page walks you from an empty template to a published rock.
Create a new repository from the template by following GitHub's guide on creating a repository from a template. Use canonical/rocks-template as the template.
The repository visibility matters:
| Visibility | What you need to do |
|---|---|
| Public | Nothing extra. Note that Pro-enabled rocks cannot be uploaded to GHCR. |
| Private / Internal | Create the REPO_CLONER_TOKEN secret, otherwise the build job cannot check out the repository. |
| File | Action |
|---|---|
README.md |
Replace the placeholder with your rock's own README. |
CODEOWNERS |
Optional but recommended: add the teams or people responsible for the rock. See about code owners for more information on CODEOWNERS. |
.github/ci.yaml |
Review the defaults (GHCR upload and CVE scan enabled, one image at the repository root). |
rockcraft.yaml |
Add it. This is your rock's recipe. |
spread.yaml and spread/
|
Add them to test the rock. |
You do not need to edit the files under .github/workflows/ to get started.
Before committing, pack the rock locally with Rockcraft to catch problems early:
sudo snap install rockcraft --classic
rockcraft packSee Defining your rock for more information on local builds. You can also test your rock locally. This is optional.
Commit your files and push them. In the Actions tab of your repository you will see the following:
-
Rock CI pipeline: runs on pushes and pull requests targeting
main, and can be started manually. It validates the configuration, builds, tests and (only onmain) uploads the rock. - Threat monitor: runs daily and scans the published images for vulnerabilities.
After a successful run on main, your rock is available at:
ghcr.io/<owner>/<repository>/<rock-name>:<version>-<base>_edge
An example of the this is ghcr.io/my-org/my-rocks/my-rock:0.1-24.04_edge. See how tags are derived.