Skip to content

Commit

Permalink
cleanup github runner added
Browse files Browse the repository at this point in the history
  • Loading branch information
3x3cut0r committed Jul 8, 2024
1 parent 60b5fbe commit bbbb46e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/systemd/system/cleanup-github-runner.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Unit]
Description=service to cleanup github runner

[Service]
Type=oneshot
ExecStart=/opt/scripts/cleanupGithubRunner.sh
10 changes: 10 additions & 0 deletions lib/systemd/system/cleanup-github-runner.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=timer to cleanup github runner

[Timer]
OnCalendar=Wed *-*-* 01:00:00
Unit=cleanup-github-runner.service
Persistent=true

[Install]
WantedBy=multi-user.target
6 changes: 6 additions & 0 deletions opt/scripts/cleanupGithubRunner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
docker container stop $(docker ps -q)
docker builder prune -af
docker image prune -af
docker volume prune -af
docker system prune -af

0 comments on commit bbbb46e

Please sign in to comment.