Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add remove-large-packages option #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ inputs:
description: 'Removes cached Docker images. (frees ~3 GB)'
required: false
default: 'false'
remove-large-packages:
description: 'Removes large packages. (frees ~5 GB)'
required: false
default: 'false'
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -105,6 +109,9 @@ runs:
if [[ ${{ inputs.remove-docker-images }} == 'true' ]]; then
echo -n "docker "
fi
if [[ ${{ inputs.remove-large-packages }} == 'true' ]]; then
echo -n "large-packages "
fi
echo

echo "Removing unwanted software... "
Expand All @@ -123,6 +130,22 @@ runs:
if [[ ${{ inputs.remove-docker-images }} == 'true' ]]; then
sudo docker image prune --all --force
fi
if [[ ${{ inputs.remove-large-packages }} == 'true' ]]; then
sudo apt-get purge -y \
'^llvm-.*' \
'php.*' \
'^mongodb-.*' \
'^mysql-.*' \
azure-cli \
google-cloud-sdk \
Copy link

@lilyinstarlight lilyinstarlight Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
google-cloud-sdk \

As of the most recent GHA Ubuntu image, I'm getting E: Unable to locate package google-cloud-sdk when using the action from this PR branch. So I think it probably just needs to be removed now

Thank you for this PR!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: it seems there is a package google-cloud-cli instead and a /usr/lib/google-cloud-sdk which contains some 100MB (maybe 1Gb - don't remember exactly)

google-chrome-stable \
firefox \
powershell \
microsoft-edge-stable \
mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
fi
echo "... done"

VG_NAME=buildvg
Expand Down