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

Automate catalog generation #21

Open
deboer-tim opened this issue Feb 12, 2024 · 5 comments
Open

Automate catalog generation #21

deboer-tim opened this issue Feb 12, 2024 · 5 comments

Comments

@deboer-tim
Copy link
Contributor

The catalog was designed to support automation, but so far each entry is added by hand. With several extensions now contributed to the catalog and likely to be frequent releases for several of them, it makes sense to start automating some of the steps to make it easier to update and reduce likelihood of human error.

Quick thought at first step: have a pre-extensions.json, same as today but versions just has ghcr urls. A script or github action could automate pulling each extension down, extracting README/license/icon into the right location, and generating extensions.json.

@benoitf
Copy link
Contributor

benoitf commented Feb 12, 2024

IMHO it's the extension that needs to create a PR there as part of it's release workflow, not the registry that will pull/check stuff

@deboer-tim
Copy link
Contributor Author

I was thinking the registry release automation would add the line in pre-extensions.json (not populate all the content), then catalog PR check becomes the thing that verifies it exists and caches it. I'm fine for that part to go in each extension's release too, but then I think we should create something reusable / easy for extensions to pick up.

@axel7083
Copy link
Contributor

axel7083 commented May 3, 2024

Extension repository would have some issue creating a pull request as part of an automation process, as they would need first to checkout the containers/podman-desktop-catalog, create a fork, do the modification and then open the pull request.

This could be solved by giving some tokens autorisation allowing them to create branch on this repository, but I would not be in favor of distributing some authorization token.

Another solution would be to use the dependabot.

  • In the main branch we declare all the extensions and their version,
  • We create a gh-pages-generation action: cloning the repository of the extensions, getting the data they need from their packages.json and generate the the catalog

The dependabot would automatically open the pull request when new release of the extensions are released

@benoitf
Copy link
Contributor

benoitf commented May 3, 2024

I don't see why you're talking about token autorisation. Anyone can create PR on this repository, people don't need to be able to push branches to this repository, only in their fork.

Note that this is the process used by brew with thousands of packages.

I think here we're mixing automation and contribution. Contribution is still done by PR. Automation is how to automatically create PR when there is a new version detected or how to smoothly create the PR

@axel7083
Copy link
Contributor

axel7083 commented May 3, 2024

Sorry if I was not clear. Let's say I want my extension to automatically open pull request adding the new version released.

Inside the github-action, I would need to be able to open a pull request on this repository, meaning, in some way, I would need to clone, fork, push and finally open the pull request from the fork, to the repository.

I am talking about fork because, if the github action is on the extension repository it does not have autorisation to create a branch on the catalog repository just like it is doing for a release

image

I might not know about some missing trick/hack allowing to perform something similar accros repositories...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants