Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Action for uploading file resources #99

Open
kian99 opened this issue Jun 7, 2023 · 0 comments
Open

New Action for uploading file resources #99

kian99 opened this issue Jun 7, 2023 · 0 comments
Labels

Comments

@kian99
Copy link
Contributor

kian99 commented Jun 7, 2023

Enhancement Proposal

This request is similar to #16, in the sense that it is looking to address a gap currently in the existing actions for charms with file resources.
The upload-charm readme contains the following,

When uploading a charm with file resources, the most recent resource will be attached to the release. If you want to use a new resource, you'll have to cut a new resource revision prior to running the action.

If I'm not mistaken this would mean a workflow that wants to upload a resource + a charm in one go would need to look something like the below. This feels like extra boilerplate and a lack of consistency between the manual steps and the action. My suggestion would be a separate action dedicated to uploading file resources, that would prevent any breaking changes to the upload-charm action.

      - uses: actions/download-artifact@master
        with:
          name: <snap-name>
      - name: Install charmcraft
        run: sudo snap install charmcraft --channel=2.x/stable
      - name: Publish Charm Resource
        run: charmcraft upload-resource <charm-name> <resource-name> --filepath ./<file-name>
        env:
          CHARMCRAFT_AUTH: "${{ secrets.CHARMHUB_TOKEN }}"
      - name: Upload charm to charmhub
        uses: canonical/charming-actions/[email protected]
        with:
          credentials: "${{ secrets.CHARMHUB_TOKEN }}"
          github-token: "${{ secrets.GITHUB_TOKEN }}"
          channel: "${{ steps.channel.outputs.name }}"

Interested to hear alternate approaches to this issue.

@kian99 kian99 added Status: Triage Type: Enhancement New feature or request labels Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant