Skip to content

Commit cc0beca

Browse files
authored
Merge pull request #9 from ublue-os/sync-with-upstream-20250225
chore: sync with upstream 20250225
2 parents 5a8b037 + 174a485 commit cc0beca

File tree

3 files changed

+45
-44
lines changed

3 files changed

+45
-44
lines changed

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
github: [AdityaGarg8]
4+
custom: ['https://www.buymeacoffee.com/gargadityav']

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Btw: the choice of removable packages is not an expression of dislike against th
2828

2929
At the time of writing, public [Github-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners) are using [Azure DS2_v2 virtual machines](https://docs.microsoft.com/en-us/azure/virtual-machines/dv2-dsv2-series#dsv2-series), featuring a 84GB OS disk on `/` and a 14GB temp disk mounted on `/mnt`.
3030

31-
1. The root file system has ~29GB (of 84GB) available, the rest being consumed by the preinstalled build environment. Github runners come with a rich choice of software, see the image descriptions for [Ubuntu 18.04](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md) or [Ubuntu 20.04](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md). This is great to support a wide variety of workflows out of the box, but also consumes a lot of space by providing programs that might be unnecessary for an individual build job.
31+
1. The root file system has ~29GB (of 84GB) available, the rest being consumed by the preinstalled build environment. Github runners come with a rich choice of software, see the image descriptions for [Ubuntu 20.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2004-Readme.md), [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) or [Ubuntu 24.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md). This is great to support a wide variety of workflows out of the box, but also consumes a lot of space by providing programs that might be unnecessary for an individual build job.
3232

3333
This action does the following:
3434

@@ -108,5 +108,5 @@ All inputs are optional and default to the following, gaining about 7-8 GB addit
108108
verbose:
109109
description: 'Enables detailed logging of the action'
110110
required: false
111-
default: 'false'
111+
default: 'false'
112112
```

action.yml

Lines changed: 39 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -95,71 +95,68 @@ runs:
9595
if [[ ${{ inputs.verbose }} == 'true' ]]; then
9696
verbose=-v
9797
fi
98-
98+
9999
echo "Removing unwanted software... "
100100
if [[ ${{ inputs.remove-dotnet }} == 'true' ]]; then
101-
$SUDO_PREFIX rm -rf ${verbose} /usr/share/dotnet
101+
sudo rm -rf ${verbose} /usr/share/dotnet
102102
fi
103103
if [[ ${{ inputs.remove-android }} == 'true' ]]; then
104-
$SUDO_PREFIX rm -rf ${verbose} /usr/local/lib/android
104+
sudo rm -rf ${verbose} /usr/local/lib/android
105105
fi
106106
if [[ ${{ inputs.remove-haskell }} == 'true' ]]; then
107-
$SUDO_PREFIX rm -rf ${verbose} /opt/ghc
108-
$SUDO_PREFIX rm -rf ${verbose} /usr/local/.ghcup
107+
sudo rm -rf ${verbose} /opt/ghc
108+
sudo rm -rf ${verbose} /usr/local/.ghcup
109109
fi
110110
if [[ ${{ inputs.remove-codeql }} == 'true' ]]; then
111-
$SUDO_PREFIX rm -rf ${verbose} /opt/hostedtoolcache/CodeQL
111+
sudo rm -rf ${verbose} /opt/hostedtoolcache/CodeQL
112112
fi
113113
if [[ ${{ inputs.remove-docker-images }} == 'true' ]]; then
114114
if [[ ${{ inputs.verbose }} == 'true' ]]; then
115-
$SUDO_PREFIX docker image prune --all --force
115+
sudo docker image prune --all --force
116116
else
117-
$SUDO_PREFIX docker image prune --all --force > /dev/null
118-
fi
117+
sudo docker image prune --all --force > /dev/null
118+
fi
119119
fi
120120
CODENAME=$(lsb_release -c | cut -d ":" -f 2 | xargs)
121-
if [[ (${CODENAME} = focal) || (${CODENAME} = jammy) ]]; then
122-
POWERSHELL=powershell
123-
else
124-
POWERSHELL=powershell-lts
125-
fi
126121
if [[ ${{ inputs.remove-large-packages }} == 'true' ]]; then
127122
if [[ ${{ inputs.verbose }} == 'true' ]]; then
128-
$SUDO_PREFIX apt-get remove -y '^aspnetcore-.*'
129-
$SUDO_PREFIX apt-get remove -y '^dotnet-.*'
130-
$SUDO_PREFIX apt-get remove -y '^llvm-.*'
131-
$SUDO_PREFIX apt-get remove -y 'php.*'
132-
$SUDO_PREFIX apt-get remove -y '^mongodb-.*'
133-
$SUDO_PREFIX apt-get remove -y '^mysql-.*'
134-
$SUDO_PREFIX apt-get remove -y azure-cli google-chrome-stable firefox ${POWERSHELL} mono-devel libgl1-mesa-dri --fix-missing
135-
if [[ (${CODENAME} = focal) || (${CODENAME} = jammy) ]]; then
136-
$SUDO_PREFIX apt-get remove -y google-cloud-sdk --fix-missing
137-
$SUDO_PREFIX apt-get remove -y google-cloud-cli --fix-missing
123+
sudo apt-get remove -y '^aspnetcore-.*'
124+
sudo apt-get remove -y '^dotnet-.*'
125+
sudo apt-get remove -y '^llvm-.*'
126+
sudo apt-get remove -y 'php.*'
127+
sudo apt-get remove -y '^mongodb-.*'
128+
sudo apt-get remove -y '^mysql-.*'
129+
if [[ "$(uname -m)" == "x86_64" ]]; then
130+
sudo apt-get remove -y google-chrome-stable microsoft-edge-stable
131+
sudo apt-get remove -y google-cloud-cli --fix-missing
132+
sudo apt-get remove -y powershell --fix-missing
138133
fi
139-
$SUDO_PREFIX apt-get autoremove -y
140-
$SUDO_PREFIX apt-get clean
134+
sudo apt-get remove -y azure-cli firefox mono-devel libgl1-mesa-dri --fix-missing
135+
sudo apt-get autoremove -y
136+
sudo apt-get clean
141137
else
142-
$SUDO_PREFIX apt-get remove -y '^aspnetcore-.*' > /dev/null
143-
$SUDO_PREFIX apt-get remove -y '^dotnet-.*' > /dev/null
144-
$SUDO_PREFIX apt-get remove -y '^llvm-.*' > /dev/null
145-
$SUDO_PREFIX apt-get remove -y 'php.*' > /dev/null
146-
$SUDO_PREFIX apt-get remove -y '^mongodb-.*' > /dev/null
147-
$SUDO_PREFIX apt-get remove -y '^mysql-.*' > /dev/null
148-
$SUDO_PREFIX apt-get remove -y azure-cli google-chrome-stable firefox ${POWERSHELL} mono-devel libgl1-mesa-dri --fix-missing > /dev/null
149-
if [[ (${CODENAME} = focal) || (${CODENAME} = jammy) ]]; then
150-
$SUDO_PREFIX apt-get remove -y google-cloud-sdk --fix-missing > /dev/null
151-
$SUDO_PREFIX apt-get remove -y google-cloud-cli --fix-missing > /dev/null
138+
sudo apt-get remove -y '^aspnetcore-.*' > /dev/null
139+
sudo apt-get remove -y '^dotnet-.*' > /dev/null
140+
sudo apt-get remove -y '^llvm-.*' > /dev/null
141+
sudo apt-get remove -y 'php.*' > /dev/null
142+
sudo apt-get remove -y '^mongodb-.*' > /dev/null
143+
sudo apt-get remove -y '^mysql-.*' > /dev/null
144+
if [[ "$(uname -m)" == "x86_64" ]]; then
145+
sudo apt-get remove -y google-chrome-stable microsoft-edge-stable > /dev/null
146+
sudo apt-get remove -y google-cloud-cli --fix-missing > /dev/null
147+
sudo apt-get remove -y powershell --fix-missing > /dev/null
152148
fi
153-
$SUDO_PREFIX apt-get autoremove -y > /dev/null
154-
$SUDO_PREFIX apt-get clean > /dev/null
155-
fi
149+
sudo apt-get remove -y azure-cli firefox mono-devel libgl1-mesa-dri --fix-missing > /dev/null
150+
sudo apt-get autoremove -y > /dev/null
151+
sudo apt-get clean > /dev/null
152+
fi
156153
fi
157154
if [[ ${{ inputs.remove-cached-tools }} == 'true' ]]; then
158-
$SUDO_PREFIX rm -rf ${verbose} "$AGENT_TOOLSDIRECTORY"
155+
sudo rm -rf ${verbose} "$AGENT_TOOLSDIRECTORY"
159156
fi
160157
if [[ ${{ inputs.remove-swapfile }} == 'true' ]]; then
161-
$SUDO_PREFIX swapoff -a ${verbose}
162-
$SUDO_PREFIX rm -f ${verbose} /mnt/swapfile
158+
sudo swapoff -a ${verbose}
159+
sudo rm -f ${verbose} /mnt/swapfile
163160
fi
164161
echo "... done"
165162

0 commit comments

Comments
 (0)