Skip to content

Set the output to the output of the charmcraft CLI #154

Description

@yhaliaw

Enhancement Proposal

For actions such as upload-charm, charmcraft would output a JSON formatted message.
https://juju.is/docs/sdk/charmcraft-upload

Can the output of the action also have the output set to this JSON message?
https://github.com/canonical/charming-actions/blob/main/upload-charm/README.md

For my use case, I need to the error message from the charmcraft upload and process it in the next job step.
E.g.:

{
    "errors": [
        {
            "code": "review-error",
            "message": "Cannot insert package. An upload with that digest (SHA3-384: 'fdd098ab9c62a6b98fd3001201760b041197bf4c4114af0adf0f9f72ba0858f9da1a61cd654e0511f38f8c7d40c4[32](https://github.com/canonical/content-cache-operator/actions/runs/12722144608/job/35503821786#step:7:33)44') already exists in the database. Revision of the existing package is: 7"
        }
    ]
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions