Skip to content
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
20 changes: 12 additions & 8 deletions .github/actions/pull_images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ inputs:
runs:
using: composite
steps:
- name: Free Disk Space
uses: endersonmenezes/free-disk-space@7901478139cff6e9d44df5972fd8ab8fcade4db1 # v3.2.2
with:
remove_android: false # Takes a long time to remove even with rmz
remove_dotnet: true # Pretty quick and saves a lot
remove_haskell: true # Extremely quick and saves a lot
remove_tool_cache: false # Decent savings but not fast enough
remove_packages: false # By far the slowest option
remove_packages_one_command: true
remove_folders: "/usr/share/swift /usr/share/az* /usr/local/share/chromium"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid wildcard path in remove_folders configuration

remove_folders includes /usr/share/az*, but this action passes each folder argument quoted (run_rm -f "${FOLDER}" in the pinned endersonmenezes/free-disk-space script), so globbing does not occur and the literal * path is not removed. On runners where Azure directories are present, this silently reclaims less space than expected and can leave docker compose pull vulnerable to running out of disk.

Useful? React with 👍 / 👎.

rm_cmd: "rmz" # Use 'rmz' for faster deletion (default: 'rm')
rmz_version: "3.1.1" # Required when rm_cmd is 'rmz'
- name: Get image list
shell: bash
run: |
Expand All @@ -37,10 +49,6 @@ runs:
username: ${{ inputs.dockerhub_username }}
password: ${{ inputs.dockerhub_token }}

- name: clean-up
shell: bash
run: sudo rm -rf /usr/local/lib/android

#retry
- name: Pull
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
Expand All @@ -50,7 +58,3 @@ runs:
timeout_minutes: 15
retry_wait_seconds: 10
max_attempts: 3

- name: Disk space usage
shell: bash
run: df -h
Loading