npackd / npackd-gae-web

Npackd web application
https://www.npackd.org
GNU General Public License v3.0
4 stars 3 forks source link

A way to trigger new version detection from script #6

Closed filips123 closed 3 years ago

filips123 commented 3 years ago

I think it would be useful to have some API that can trigger new version detection from script (and probably also automatically fill SHA-256 hashes). My use-case for this is to set up automatic CI/CD system (using GitHub Actions, but that doesn't really matter) that would automatically submit new versions to package managers as soon as I release them. I don't know if, or how ofter, does Npackd server automatically trigger new version detection, but having a way to automatically ensure package is always updated to the newest version would be nice.

Because Npackd server only uses Google for auth, it is harder to use in scripts and automated environments. Solution for this could be to also allow users to generate tokens (which could be per-package for better security, could have different permission levels, and user should be able to revoke and regenerate them individually) that could be used as auth to trigger new version detection.

tim-lebedkov commented 3 years ago

The detection runs daily on AppVeyor. Here is an example: https://ci.appveyor.com/project/tim-lebedkov/npackd/builds/40214128/job/r1tcftbqth9b9hl5

Here is the source code:https://github.com/npackd/npackd

I also use a couple of "passwords" instead of the usual Google Authentication mainly because it would take some time to figure it out.

Let me know if you would need something else.

filips123 commented 3 years ago

Ok, I think daily detection should be fast enough for most software, so a new way to trigger it probably isn't needed. Thanks for your response!