facundoolano / feedi

A personal news aggregator and Mastodon client
GNU Affero General Public License v3.0
888 stars 28 forks source link

Action to create and push a docker image #102

Closed julienma closed 2 months ago

julienma commented 2 months ago

This PR adds a GitHub Action to automatically build a docker image for Feedi and push it as a public package in GitHub registry, which would make it the "official" docker image.

Here's how it looks on my fork:

image

GitHub Packages is free for public repo: https://docs.github.com/en/billing/managing-billing-for-github-packages/about-billing-for-github-packages. If you prefer to publish to another registry like Docker Hub, it's trivial: https://docs.github.com/en/actions/publishing-packages/publishing-docker-images.


I'm using https://runtipi.io as an easy way to manage various apps. I'd like to propose Feedi in their app directory (https://runtipi.io/docs/apps-available).

It's quite easy to propose new apps (https://runtipi.io/docs/contributing/adding-a-new-app), but this requires a public docker image for Feedi.

Even though the current Make task to build a docker image is easy, it still requires cloning the repo locally and pulling regularly. I also believe that having a public docker image always up-to-date would make it easier for more people to start using Feedi.

Happy to discuss pros/cons.

And thanks for maintaining Feedi!

julienma commented 2 months ago

Sorry, I pushed another commit in the same branch, so it ended in the same PR. LMK if you want me to split them.

It's still related though, as the 2nd commit adds Node to the docker image, in order to enable the local reader mode. It adds about ~130 MB to the built image.

facundoolano commented 2 months ago

Hey, thanks! Let me look into this. I'm thinking that if the app is going to be uploaded to docker repos it'd be best to start using proper versions (and upload on new tags rather than on every commit to main).

julienma commented 2 months ago

Ha, yeah, definitely :)

facundoolano commented 2 months ago

I've updated the action to push on tag as discussed. I'll merge this and test with some tags.

julienma commented 2 months ago

Nice!

I can see the tag 0.1.0 and the action run (https://github.com/facundoolano/feedi/actions/runs/9945792573), but can't find the docker image. Did you delete it afterwards?

julienma commented 2 months ago

Oh well, I found it here: https://github.com/facundoolano/feedi/pkgs/container/feedi

I don't understand why it's not showing up on the repo home. I would have expected a "Packages" section to be shown in the bottom right of this page: https://github.com/facundoolano/feedi.

facundoolano commented 2 months ago

I don't understand why it's not showing up on the repo home. I would have expected a "Packages" section to be shown in the bottom right of this page: https://github.com/facundoolano/feedi.

I had to enable the packages section in the side bar, it should be visible now.