From 7a818a28571c183f1b107f97654fcae3586be664 Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Wed, 13 Mar 2024 13:47:39 +0100 Subject: [PATCH] Clean up old Vagrant and GitHub Actions artifacts on the runner --- .github/workflows/vagrant-up.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/vagrant-up.yml b/.github/workflows/vagrant-up.yml index aba37b4..92da6da 100644 --- a/.github/workflows/vagrant-up.yml +++ b/.github/workflows/vagrant-up.yml @@ -28,11 +28,23 @@ jobs: group: Default labels: [self-hosted, Linux, X64] steps: - - name: clean up old VMs + - name: clean up old VirtualBox VMs run: | vboxmanage list vms | \ grep -o -P '(?<={).*(?=})' | \ while read line ; do vboxmanage unregistervm $line --delete ; done + - name: clean up old Vagrant artifacts + run: | + vagrant destroy emoflon + vagrant box remove gusztavvargadr/xubuntu-desktop-2204-lts + rm -rf /opt/actions-runner/_work/emoflon-ibex-vm + # https://stackoverflow.com/a/71346341 + - name: clean up old GitHub Actions runner build folder + run: | + ls -la ./ + rm -rf ./* || true + rm -rf ./.??* || true + ls -la ./ - uses: actions/checkout@v4 - name: show Vagrant version run: vagrant --version @@ -42,7 +54,7 @@ jobs: echo "=> Vagrant run finished." env: GITHUB_TOKEN: ${{ github.token }} - - name: export virtualbox VM + - name: export VirtualBox VM run: | vagrant halt vboxmanage export emoflon -o emoflon.ovf