Compare commits
8 Commits
f72966f229
...
758e0fb3ba
| Author | SHA1 | Date | |
|---|---|---|---|
| 758e0fb3ba | |||
| e1fb378cd3 | |||
| cedd54f901 | |||
| 49156df8b4 | |||
| f7990beee6 | |||
| 6deeb3d2a7 | |||
| e1673c5f10 | |||
| e42a65cc6e |
@@ -62,10 +62,6 @@ jobs:
|
||||
title: "Kubernetes Apply Failed"
|
||||
message: |
|
||||
Failed to apply kubernetes configs
|
||||
Workflow: ${{ gitea.workflow }}
|
||||
Repository: ${{ gitea.repository }}
|
||||
Job: update-infrastructure
|
||||
Status: ${{ needs.update-infrastructure.result }}
|
||||
action_url: "https://git.alexmickelson.guru/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}"
|
||||
priority: "high"
|
||||
tags: "rotating_light,kubernetes"
|
||||
@@ -36,10 +36,6 @@ jobs:
|
||||
title: "ZFS Backup Failed"
|
||||
message: |
|
||||
Failed to backup ZFS datasets
|
||||
Workflow: ${{ gitea.workflow }}
|
||||
Repository: ${{ gitea.repository }}
|
||||
Job: update-infrastructure
|
||||
Status: ${{ needs.update-infrastructure.result }}
|
||||
action_url: "https://git.alexmickelson.guru/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}"
|
||||
priority: "high"
|
||||
tags: "rotating_light,backup"
|
||||
31
.gitea/workflows/cleanup-docker.yml
Normal file
31
.gitea/workflows/cleanup-docker.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Cleanup Docker
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 3 1,15 * *' # 1st and 15th of every month at 3am
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
cleanup-docker:
|
||||
runs-on: [home-server]
|
||||
steps:
|
||||
- name: Cleanup Docker resources
|
||||
run: |
|
||||
echo ""
|
||||
echo "Removing unused images..."
|
||||
docker image prune -a -f --filter "until=336h"
|
||||
|
||||
|
||||
notify-on-failure:
|
||||
runs-on: home-server
|
||||
needs: cleanup-docker
|
||||
if: failure()
|
||||
uses: ./.gitea/workflows/notify-ntfy.yml
|
||||
secrets:
|
||||
NTFY_CHANNEL: ${{ secrets.NTFY_CHANNEL }}
|
||||
with:
|
||||
title: "Docker Cleanup Failed"
|
||||
message: |
|
||||
Failed to cleanup Docker resources
|
||||
action_url: "https://git.alexmickelson.guru/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}"
|
||||
priority: "high"
|
||||
tags: "rotating_light,docker"
|
||||
@@ -24,10 +24,6 @@ jobs:
|
||||
title: "NixOS Cleanup Failed"
|
||||
message: |
|
||||
Failed to cleanup old NixOS generations
|
||||
Workflow: ${{ gitea.workflow }}
|
||||
Repository: ${{ gitea.repository }}
|
||||
Job: cleanup-generations
|
||||
Status: ${{ needs.cleanup-generations.result }}
|
||||
action_url: "https://git.alexmickelson.guru/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}"
|
||||
priority: "high"
|
||||
tags: "rotating_light,nixos"
|
||||
|
||||
@@ -30,10 +30,6 @@ jobs:
|
||||
title: "Libation Sync Failed"
|
||||
message: |
|
||||
Failed to sync audiobooks with Libation
|
||||
Workflow: ${{ gitea.workflow }}
|
||||
Repository: ${{ gitea.repository }}
|
||||
Job: sync-audiobooks
|
||||
Status: ${{ needs.sync-audiobooks.result }}
|
||||
action_url: "https://git.alexmickelson.guru/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}"
|
||||
priority: "high"
|
||||
tags: "rotating_light,audiobooks"
|
||||
|
||||
@@ -40,10 +40,6 @@ jobs:
|
||||
title: "Jellyfin Playlist Update Failed"
|
||||
message: |
|
||||
Failed to update Jellyfin playlists
|
||||
Workflow: ${{ gitea.workflow }}
|
||||
Repository: ${{ gitea.repository }}
|
||||
Job: run-python
|
||||
Status: ${{ needs.run-python.result }}
|
||||
action_url: "https://git.alexmickelson.guru/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}"
|
||||
priority: "high"
|
||||
tags: "rotating_light,jellyfin"
|
||||
|
||||
@@ -128,6 +128,11 @@
|
||||
];
|
||||
services.envfs.enable = true;
|
||||
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
wheelNeedsPassword = true;
|
||||
};
|
||||
|
||||
# printing
|
||||
services.printing = {
|
||||
enable = true;
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
users = [ "gitea-runner" ];
|
||||
commands = [
|
||||
{
|
||||
command = "${pkgs.nix}/bin/nix-collect-garbage";
|
||||
options = [ "NOPASSWD" ];
|
||||
command = "/run/current-system/sw/bin/nix-collect-garbage";
|
||||
options = [ "NOPASSWD" "SETENV" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -86,6 +86,8 @@
|
||||
User = lib.mkForce "gitea-runner";
|
||||
Group = lib.mkForce "gitea-runner";
|
||||
|
||||
Environment = lib.mkForce [ "PATH=/run/wrappers/bin:/run/current-system/sw/bin" ];
|
||||
|
||||
DynamicUser = lib.mkForce false;
|
||||
PrivateDevices = lib.mkForce false;
|
||||
PrivateMounts = lib.mkForce false;
|
||||
@@ -116,4 +118,6 @@
|
||||
|
||||
Restart = lib.mkForce "always";
|
||||
};
|
||||
|
||||
systemd.services.gitea-runner-infrastructure.path = [ pkgs.sudo ];
|
||||
}
|
||||
Reference in New Issue
Block a user