github-releases-bot
codeberg.org
external-link
This repository contains code to scan for new releases of configurable github repositories and publish new releases to different Mastodon accounts.

I’m selfhosting several services, mostly based on docker containers. Many of these are managed on Github and publish releases there. What annoys me is that I regularly miss updates.

I’m also quite active on Mastodon so I thought it would be handy to have a bot automatically scanning for new github releases and posting a new toot for every new release.

The bot can be configured to scan multiple different github repositories and publish to different mastodon accounts.

I have set up accounts for:

https://mastodon.social/@navidrome_releases
https://mastodon.social/@vaultwarden_releases
https://mastodon.social/@dockerpihole_releases
https://mastodon.social/@tempo_releases
https://mastodon.social/@unifidocker_releases

You can use the notification feature of Mastodon to get a notification, whenever a new post is published. Just follow an account and hit the little bell icon on its profile page.

Here’s the code, if someone is interested in that:

https://codeberg.org/ryan_harg/github-releases-bot

Is this something that you people find useful? Which other services would you like to see covered in that way?

@rambos@lemm.ee
link
fedilink
English
41Y

Is there any way to get those notifictions over selfhosted gotify?

@American_Jesus@lemm.ee
link
fedilink
English
41Y

You can get the rss of new releases with rss, and use rss plugin for Gotify
https://github.com/solarkennedy/gotify-rss
https://piraces.dev/short-bits/github-releases-feed-atom/

@rambos@lemm.ee
link
fedilink
English
11Y

May I ask for some help please. I dont know how to use this command:

$ make GOTIFY_VERSION="v2.0.5" FILE_SUFFIX="for-gotify-v2.0.5" build

Where should I type that? How can I build that plugin?

@American_Jesus@lemm.ee
link
fedilink
English
1
edit-2
1Y

make GOTIFY_VERSION=“v2.0.5” FILE_SUFFIX=“for-gotify-v2.0.5” build

Use the gotify version according to the one installed on your system.
EX: make GOTIFY_VERSION="v2.4.0" FILE_SUFFIX="for-gotify-v2.4.0" build
for the latest release

the on build/you should have some .so files, copy the one for your machine arch to gotify plugins dir data/plugins

where a build for gotify v2.4.0 https://nowtransfer.de/3460c8e86670
copy only the one needed

@rambos@lemm.ee
link
fedilink
English
11Y

Copying your file to data/plugins worked! Now just have to wait for next feed to test it out. Thank you again <3

Still don’t know how to use command tho :D Sorry, I’m noob. Was trying to enter that command in terminal, but I get:

make: *** No rule to make target 'build'.  Stop.
@American_Jesus@lemm.ee
link
fedilink
English
11Y

Assuming you are on a Debian/Ubuntu based distro, make sure you have the following packages installed build-essential golang

However Gotify recomends using docker to build plugins
https://gotify.net/docs/plugin-deploy#with-docker-recommended

@rambos@lemm.ee
link
fedilink
English
11Y

Thank you! I use Debian 11, installed make, build-essential and golang, and still receiving the same message (feels like I should learn how to use these packages first).

Using your file was working, but unfortunately gotify container just stops after some time. I was reading the docs and I must admit I don’t understand a tiny bit :D. Spinning gotify server in docker container was super easy tho. I’d like to get this working, but feels bad for taking your time mate, and I even stole the thread (Sorry OP) lol.

@rambos@lemm.ee
link
fedilink
English
11Y

Thank you a lot, Ill try it out

@gla3dr@lemmy.ca
link
fedilink
English
251Y

Why not just subscribe to the release notifications or use the releases atom feed?

Eskuero
link
fedilink
English
8
edit-2
1Y

I do it that way. Enable email notifications for new tagged releases, something arrives, check changelog, everything fine?

docker-compose pull; docker-compose down; docker-compose up -d

And we are done

@dan@upvote.au
link
fedilink
English
1
edit-2
1Y

FYI, docker-compose is the legacy version that was deprecated a few years ago and no longer receives updates. docker compose (with a space instead of a hyphen) is what you should be using these days.

Ryan
creator
link
fedilink
English
11Y

deleted by creator

@Link@rentadrunk.org
link
fedilink
English
21Y

You don’t need to run docker-compose down.

docker-compose pull; docker-compose up -d is enough

Eskuero
link
fedilink
English
11Y

I guess that’s fair for single service composes but I don’t really trust composes with multiple services to gracefully handle only recreating one of the containers

You can docker compose up -d <service> to (re)create only one service from your Dockerfile

@Link@rentadrunk.org
link
fedilink
English
21Y

If only one container has been updated then when you run docker compose up -d it will only recreate that container, unless it is a dependency of another container (like a database) in which case it will restart all containers that depend on it as well.

Ryan
creator
link
fedilink
English
7
edit-2
1Y

The bot consumes the atom feed of a repository, but I don’t use a feed reader. you could also just let Github notify you for new releases. But I don’t pay much attention to github notifications either. I’m a lot more likely to notice something like that if it’s integrated into my social media consumption.

@gla3dr@lemmy.ca
link
fedilink
English
11Y

That makes sense. Pretty cool, nice work!

deleted by creator

Ryan
creator
link
fedilink
English
3
edit-2
1Y

deleted by creator

BlackEco
link
fedilink
English
101Y

Exactly, I don’t get the “Mastodon as a poor man’s RSS agregator” trend

@gla3dr@lemmy.ca
link
fedilink
English
31Y

I wasn’t trying to throw shade here. I was just genuinely curious about OPs motivations for doing this. It’s totally reasonable that they could have a use case where this solution makes the most sense.

@bjmllr@lemm.ee
link
fedilink
English
21Y

Off the top of my head, boosting, voting, and discussion.

@gla3dr@lemmy.ca
link
fedilink
English
11Y

Yeah, good point!

synae[he/him]
link
fedilink
English
11Y

You could get notified with a PR to update a version with renovate.

(Assuming you have your selfhosting configurations checked into source control, which I realize as I’m typing this that it might not be the norm…)

Ryan
creator
link
fedilink
English
11Y

that’s a good idea. i have some of my configurations under version control, but mostly on codeberg. not sure how renovate integrates there…

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 401 users / day
  • 608 users / week
  • 1.44K users / month
  • 3.91K users / 6 months
  • 1 subscriber
  • 4.17K Posts
  • 86.6K Comments
  • Modlog