← 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 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.

Suggested action: close stale

Reason: The maintainer (cjdcordeiro) acknowledged the request on 2023-02-06 but explicitly deferred it, saying rockcraft 'should eventually have an upload operation' and pointing to existing marketplace actions (push-oci-archive-to-remote-registry, skopeo-copy-action) as alternatives. No action was created in the repo (layout shows only rockcraft-pack and rockcraft/setup), and there has been zero activity for ~3.5 years. The deferral was conditional on upstream rockcraft changes, and the project has clearly moved on without implementing this specific action.

Impact: 35 Quick Win: 21.0 Staleness: 92 Complexity: 40 Confidence: 72 Support Request: 10

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
qwen/qwen3.8-27b
Impact: 35
Quick Win: 21.0
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 40
Confidence: 80
Support Request: 5
needs triage Proposes a GitHub Action to publish rock artifacts to GitHub Container Registry using skopeo. Currently under discussion; maintainers are weighing whether to create a placeholder action now or wait for native rockcraft upload support.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/snapcraft-rocks#31 (confidence 55%)

    Merged PR that added a CI job to publish rocks from the snapcraft-rocks repo to a container registry, but this is a one-off CI workflow for that specific repo, not the reusable GitHub Action requested here.

Related issues

Issue Project State Summary Similarity
#31 feat(ci): publish rocks to github container registry snapcraft-rocks merged Merged. Added a CI job to publish rocks to the GitHub Container Registry on pushes to specific core branches. Approved by two reviewers, with changes limited to a single file.
71%