← Back to issue list

[Feature Request] Publish rock to Github's Container Registry

View original Github issue

Metadata

Project
craft-actions
Number
#5
Type
issue
State
open
Author
gruyaume
Labels
—
Created
Updated
Closed
—

Current evaluation

Feature request for a new `rockcraft-publish-ghcr` action to push built rocks to ghcr.io; acknowledged by maintainer in 2023 but ownership deferred pending `rockcraft upload`; still unimplemented.

Suggested action: keep open

Reason: Maintainer @cjdcordeiro explicitly agreed ("I agree we should have something like this") and asked for @sergiusens' opinion, so the request is acknowledged as valid but its owner is undecided. The repo layout still shows only `rockcraft-pack`, `rockcraft/setup`, and analogous pack/setup actions — no publish action exists — so the feature is genuinely unimplemented, and the contributor supplied a working skopeo/docker-login YAML plus a concrete API (artifact_name/image_name/image_version/organization) that makes it near turnkey. Age and the unresolved "who does that job" question are not grounds for closing; confidence is capped because the outcome depends on whether `rockcraft upload` has since landed (upstream tool access to craft-actions was unavailable to confirm), and the maintainer floated third-party actions (push-oci-archive-to-remote-registry, skopeo-copy-action) as an alternative.

Evaluated by: mr-cal-bot

Impact: 50 Quick Win: 22 Complexity: 40 Confidence: 68 Actionability: 75

Issue body

## 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](ghcr.io). 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](ghcr.io). This action would fetch the artifact created by the `rockcraft-pack` action, login to `ghcr.io`, use skopeo to copy the file to docker-daemon and push it to `ghcr.io`. ### Usage In terms of API, this could look something like: ```yaml steps: - name: Checkout repository uses: actions/checkout@v3 - uses: canonical/craft-actions/rockcraft-publish-ghcr@main with: artifact_name: rock image_name: banana image_version: 1.1.1 organization: canonical ``` For this example, the action would have published the container image to `ghcr.io/canonical/banana:1.1.1`. `image_name` and `image_version` could default to values read from `rockcraft.yaml` and `organization` could default to `canonical` so that a minimal API could be: ```yaml steps: - name: Checkout repository uses: actions/checkout@v3 - uses: canonical/craft-actions/rockcraft-publish-ghcr@main with: artifact_name: rock ``` ### Current state Here's what I have to do right now to take the provided rock and publish it to `ghcr.io`: ```yaml steps: - name: Checkout repository uses: actions/checkout@v3 - name: Log in to the Container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Install skopeo run: | sudo snap install --devmode --channel edge skopeo - name: Install yq run: | sudo snap install yq - uses: actions/download-artifact@v3 with: name: rock - name: Import and push to github package run: | image_name="$(yq '.name' rockcraft.yaml)" version="$(yq '.version' rockcraft.yaml)" rock_file=$(ls *.rock | tail -n 1) sudo skopeo \ --insecure-policy \ copy \ oci-archive:"${rock_file}" \ docker-daemon:"ghcr.io/gruyaume/${image_name}:${version}" docker push ghcr.io/gruyaume/${image_name}:${version} ``` ### Reference - https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 50
Quick Win: 22
Complexity: 40
Confidence: 68
Actionability: 75
keep open Feature request for a new `rockcraft-publish-ghcr` action to push built rocks to ghcr.io; acknowledged by maintainer in 2023 but ownership deferred pending `rockcraft upload`; still unimplemented.
qwen/qwen3.6-35b-a3b
Impact: 40
Quick Win: 17
Complexity: 30
Confidence: 80
Actionability: 60
keep open Feature request for a new GitHub Action to publish rocks to ghcr.io. Acknowledged by a maintainer in 2023 but deferred pending native rockcraft upload support or use of existing actions.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 21
Staleness: 92
Complexity: 40
Confidence: 72
Support Request: 10
close stale Feature request for a rockcraft-publish-ghcr GitHub Action to push rock artifacts to ghcr.io. Acknowledged by a maintainer in Feb 2023 but deferred pending upstream rockcraft upload support; no action was ever created. Inactive for ~3.5 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale Feature request for a GitHub Action to publish rockcraft artifacts to ghcr.io. Acknowledged by maintainers but deferred pending upstream support or use of existing marketplace actions. Inactive for over three years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale Feature request for a GitHub Action to publish rock images to ghcr.io. Acknowledged by maintainers but inactive for over 3 years with no implementation or follow-up.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft-rocks#31 (confidence 60%)

    Merged PR that adds a CI job pushing rocks to GitHub Container Registry (core22-7/22-8 branches), i.e. the same capability implemented inline downstream, showing real demand for ghcr publishing.

Related issues

Issue Project State Summary Similarity
#31 feat(ci): publish rocks to github container registry snapcraft-rocks merged Merged PR #31 added a publish-rock CI job that pushes rocks from core22-7/core22-8-style branches to GitHub Container Registry.
73%