From 758e0fb3baaec9adfeb18def48aa595a9964dfc4 Mon Sep 17 00:00:00 2001 From: Alex Mickelson Date: Wed, 18 Feb 2026 21:11:55 -0700 Subject: [PATCH] cleanup docker --- .gitea/workflows/apply-kubernetes.yml | 4 ---- .gitea/workflows/backup-zfs.yml | 4 ---- .gitea/workflows/cleanup-docker.yml | 31 +++++++++++++++++++++++++++ .gitea/workflows/cleanup-nixos.yml | 4 ---- .gitea/workflows/libation-sync.yml | 4 ---- .gitea/workflows/update-playlist.yml | 4 ---- 6 files changed, 31 insertions(+), 20 deletions(-) create mode 100644 .gitea/workflows/cleanup-docker.yml diff --git a/.gitea/workflows/apply-kubernetes.yml b/.gitea/workflows/apply-kubernetes.yml index 75d756c..0432fbb 100644 --- a/.gitea/workflows/apply-kubernetes.yml +++ b/.gitea/workflows/apply-kubernetes.yml @@ -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" \ No newline at end of file diff --git a/.gitea/workflows/backup-zfs.yml b/.gitea/workflows/backup-zfs.yml index 740ef05..e138144 100644 --- a/.gitea/workflows/backup-zfs.yml +++ b/.gitea/workflows/backup-zfs.yml @@ -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" \ No newline at end of file diff --git a/.gitea/workflows/cleanup-docker.yml b/.gitea/workflows/cleanup-docker.yml new file mode 100644 index 0000000..1144cb1 --- /dev/null +++ b/.gitea/workflows/cleanup-docker.yml @@ -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" diff --git a/.gitea/workflows/cleanup-nixos.yml b/.gitea/workflows/cleanup-nixos.yml index 384683f..dd99e9d 100644 --- a/.gitea/workflows/cleanup-nixos.yml +++ b/.gitea/workflows/cleanup-nixos.yml @@ -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" diff --git a/.gitea/workflows/libation-sync.yml b/.gitea/workflows/libation-sync.yml index 3abb7d1..9990b51 100644 --- a/.gitea/workflows/libation-sync.yml +++ b/.gitea/workflows/libation-sync.yml @@ -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" diff --git a/.gitea/workflows/update-playlist.yml b/.gitea/workflows/update-playlist.yml index b580b05..b191ca3 100644 --- a/.gitea/workflows/update-playlist.yml +++ b/.gitea/workflows/update-playlist.yml @@ -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"