-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Free up disk space in a more robust way.
Use apt patterns [0] to only try to remove real packages. Also unify the way we free up disk space for all workflows. [0] https://manpages.ubuntu.com/manpages/focal/man7/apt-patterns.7.html Signed-off-by: Dumitru Ceara <dceara@redhat.com> Acked-by: Ales Musil <amusil@redhat.com>
- Loading branch information
Showing
4 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
function free_up_disk_space_ubuntu() | ||
{ | ||
local pkgs='azure-cli aspnetcore-* dotnet-* ghc-* firefox* | ||
google-chrome-stable google-cloud-sdk libmono-* llvm-* | ||
microsoft-edge-stable mono-* msbuild mysql-server-core-* | ||
php-* php7* powershell* temurin-* zulu-*' | ||
|
||
# Use apt patterns to only select real packages that match the names | ||
# in the list above. | ||
local pkgs=$(echo $pkgs | sed 's/[^ ]* */~n&/g') | ||
|
||
sudo apt update && sudo apt-get --auto-remove -y purge $pkgs | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters