From c6c2ed6986a64ff51b97c035b27b584ca391aafd Mon Sep 17 00:00:00 2001 From: Ciapa Date: Sat, 22 Apr 2023 08:46:30 +0000 Subject: [PATCH] Frequently clean runner nix store --- .gitlab-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb96a4a..7dfcb48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,7 @@ variables: stages: - test - deploy + - scheduled before_script: - mv .gitlab/passwd /etc/passwd @@ -44,7 +45,7 @@ deploy: check updates: - stage: test + stage: scheduled script: # Prepare git access - nix-env -iA nixos.openssh @@ -65,3 +66,9 @@ check updates: rules: - if: $CI_PIPELINE_SOURCE == "schedule" +clean nix store: + stage: scheduled + script: + - nix-collect-garbage --delete-older-than 14d + rules: + - if: $CI_PIPELINE_SOURCE == "schedule"