Go to file
Elara Musayelyan 8b97df59e1
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Set platform to amd64
2023-10-07 12:02:43 -07:00
internal Create a readerValue for values that can implement the io.Reader interface 2023-09-30 16:59:10 -07:00
.gitignore Add html builtin module 2023-06-25 13:07:38 -07:00
.goreleaser.yaml Move lure-updater to updater.lure.sh 2023-10-07 11:50:57 -07:00
.woodpecker.yml Set platform to amd64 2023-10-07 12:02:43 -07:00
go.mod Add html builtin module 2023-06-25 13:07:38 -07:00
go.sum Add html builtin module 2023-06-25 13:07:38 -07:00
LICENSE Add GPLv3 license 2023-06-09 10:54:15 -07:00
lure-updater.example.toml Move lure-updater to updater.lure.sh 2023-10-07 11:50:57 -07:00
main.go Fix debug flag 2023-06-13 22:05:07 -07:00
README.md Move lure-updater to updater.lure.sh 2023-10-07 11:50:57 -07:00
template.nomad Move lure-updater to updater.lure.sh 2023-10-07 11:50:57 -07:00

LURE Updater

Modular bot that automatically checks for upstream updates and pushes new packages to lure-repo.


How it works

Since LURE is meant to be able to install many different types of packages, this bot accepts plugins in the form of Starlark files rather than hardcoding each package. These plugins can schedule functions to be run at certain intervals, or when a webhook is received, and they have access to persistent key/value storage to keep track of information. This allows plugins to use many different ways to detect upstream updates.

For example, the plugin for discord-bin repeatedly polls discord's API every hour for the current latest download link. It puts the link in persistent storage, and if it has changed since last time, it parses the URL to extract the version number, and uses that to update the build script for discord-bin.

Another example is the plugin for lure-bin, which accepts a webhook from GoReleaser. When it receives the webhook, it parses the JSON body and gets the download URL, which it uses to download the checksum file, and uses the information inside that to update the build script for lure-bin.


Configuration

There's an example config file in the lure-updater.example.toml file. Edit that to fit your needs and put it at /etc/lure-updater/config.toml. You can change the location of the config file using the --config or -c flag.