From 471f93afb71a3f59e8d3f8f5c80374430514d22f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Petrovi=C4=8D?= <xpetrov4@node.mendelu.cz>
Date: Wed, 7 Feb 2024 16:49:43 +0000
Subject: [PATCH] Update .gitlab-ci.yml file

---
 .gitlab-ci.yml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4b96ea1..d5eeb2a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,6 +10,7 @@ cache:
 stages:
   - build
   - publish
+  - cleanup
 
 
 # ===========================================================================
@@ -91,3 +92,14 @@ docker-push-tag:
   script:
     - docker load -i build/image.tar
     - docker push $DOCKER_NAMESPACE/$PROJECT_NAME:$CI_COMMIT_TAG
+
+cleanup:
+  stage: cleanup
+  image: docker:git
+  tags:
+    - cache
+  script:
+    - docker system prune -a -f || true 
+    - rm -rf build/ || true
+  when: always
+  allow_failure: true
-- 
GitLab