Open gruyaume opened 1 year ago
Thanks for putting this in @gruyaume .
I agree we should have something like this. I think the question is: who/what does that job? rockcraft
should eventually have an upload operation (very much like snapcraft
). Until then, there are existing public actions to simplify this workflow, like https://github.com/marketplace/actions/push-oci-archive-to-remote-registry and https://github.com/marketplace/actions/skopeo-copy-action. I wonder if we should already create that action, using standard tooling, as a placeholder for a future rockcraft upload/push
...? @sergiusens wdyt?
OVERVIEW
First, good job on the project and the
rockcraft-pack
action, it' will definitely be useful.As more people and teams are building rocks, we also have to publish them somewhere. One of the registries used to publish such container images is Github's container registry. Right now, this is a great place to publish container images as it is well integrated with Github where our code, CI and permissions are already managed. Here the ask is for a new action to publish the created rock to Github's container registry.
This action would fetch the artifact created by the
rockcraft-pack
action, login toghcr.io
, use skopeo to copy the file to docker-daemon and push it toghcr.io
.Usage
In terms of API, this could look something like:
For this example, the action would have published the container image to
ghcr.io/canonical/banana:1.1.1
.image_name
andimage_version
could default to values read fromrockcraft.yaml
andorganization
could default tocanonical
so that a minimal API could be:Current state
Here's what I have to do right now to take the provided rock and publish it to
ghcr.io
:Reference