Skip to content

Commit

Permalink
feat: Add remove-codeql and remove-docker-images support to action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cnshing authored and AdityaGarg8 committed Jan 4, 2024
1 parent 3b39de2 commit e9e1e3b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ inputs:
description: 'Removes GHC (Haskell) artifacts. (frees a few MBs)'
required: false
default: 'false'
remove-codeql:
description: 'Removes CodeQL Action Bundles. (frees ~5.4 GB)'
required: false
default: 'false'
remove-docker-images:
description: 'Removes cached Docker images. (frees ~3 GB)'
required: false
default: 'false'
runs:
using: "composite"
steps:
Expand All @@ -41,6 +49,12 @@ runs:
if [[ ${{ inputs.remove-haskell }} == 'true' ]]; then
echo -n "haskell "
fi
if [[ ${{ inputs.remove-codeql }} == 'true' ]]; then
echo -n "codeql "
fi
if [[ ${{ inputs.remove-docker-images }} == 'true' ]]; then
echo -n "docker "
fi
echo
echo "Removing unwanted software... "
Expand All @@ -53,6 +67,12 @@ runs:
if [[ ${{ inputs.remove-haskell }} == 'true' ]]; then
sudo rm -rf /opt/ghc
fi
if [[ ${{ inputs.remove-codeql }} == 'true' ]]; then
sudo rm -rf /opt/hostedtoolcache/CodeQL
fi
if [[ ${{ inputs.remove-docker-images }} == 'true' ]]; then
sudo docker image prune --all --force
fi
echo "... done"
- name: Disk space report after modification
Expand Down

0 comments on commit e9e1e3b

Please sign in to comment.