diff --git a/actions/clean-up-ubuntu/action.yml b/actions/clean-up-ubuntu/action.yml index 14427dd..2074bfa 100644 --- a/actions/clean-up-ubuntu/action.yml +++ b/actions/clean-up-ubuntu/action.yml @@ -1,4 +1,4 @@ -name: "Remove unwanted software in ubuntu-lastest" +name: "Remove unwanted software in ubuntu-latest" inputs: root: description: 'root where ubuntu is mounted' @@ -11,9 +11,7 @@ runs: run: | df -h - cd ${{ inputs.root }} - - arch-chroot /ubuntu apt-get autoremove -y \ + arch-chroot ${{ inputs.root }} apt-get autoremove -y \ gcc g++ gcc-{9,10,11,12,13} g++-{9,10,11,12,13} \ llvm-{13,14,15} clang-{13,14,15} clang-format-{13,14,15} \ dotnet-sdk-{6,7,8}.0 mono-complete \ @@ -23,9 +21,17 @@ runs: google-cloud-cli azure-cli \ microsoft-edge-stable google-chrome-stable firefox - arch-chroot /ubuntu dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n + cd ${{ inputs.root }} - du -csh usr/local/lib/android opt/hostedtoolcache/CodeQL - rm -rf usr/local/lib/android opt/hostedtoolcache/CodeQL + for i in usr/local/lib/android opt/hostedtoolcache/CodeQL + do + [ ! -d $i ] && continue + du -sh $i + rm -r $i + done df -h + + - uses: webiny/action-post-run@3.1.0 + with: + run: sh -c "arch-chroot ${{ inputs.root }} dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n"