infrastructure/workflows/lon-update.nix

43 lines
892 B
Nix

# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ nix-actions, ... }:
let
inherit (nix-actions.lib) nix-shell secret;
in
{
name = "Update dependencies";
on.schedule = [
# Run every 24h
{ cron = "30 13 * * *"; }
];
jobs = {
update = {
runs-on = "nix";
steps = [
{
uses = "actions/checkout@v4";
"with".token = secret "TEA_DGNUM_CHORES_TOKEN";
}
{
env = {
LON_TOKEN = secret "TEA_DGNUM_CHORES_TOKEN";
LON_USER_NAME = "DGNum [bot]";
LON_USER_EMAIL = "admins+lon-bot@dgnum.eu";
# LON_LABELS = "bot";
LON_LIST_COMMITS = true;
};
run = nix-shell {
script = "lon bot forgejo";
shell = "lon-update";
};
}
];
};
};
}