Skip to content

Conversation

adamziel
Copy link
Collaborator

Motivation for the change, related issues

Updates the publish-npm-packages.yml job to prevent the CI runner from running out of disk space.

https://github.com/WordPress/wordpress-playground/actions/runs/18473424159/job/52632469981

lerna ERR! 
lerna ERR! lerna ENOSPC: no space left on device, write

Implementation details

Removes a bunch of large files that seem to be present at the start of the job:

            - name: Free up runner disk space
              shell: bash
              run: |
                  set -euo pipefail
                  echo "Disk usage before cleanup:"
                  df -h
                  sudo rm -rf /usr/local/lib/android
                  sudo rm -rf /usr/share/dotnet
                  sudo rm -rf "$AGENT_TOOLSDIRECTORY"
                  sudo rm -rf /opt/ghc
                  sudo rm -rf /opt/hostedtoolcache/CodeQL
                  echo "Disk usage after cleanup:"
                  df -h

Testing Instructions (or ideally a Blueprint)

GitHub and testing CI PRs? Haha. Nope. Merge, run the job, hope for the best.

@adamziel adamziel changed the title [Meta] Remove a few packages before building [CI] Remove a few predefined runner files before releasing npm packages Oct 13, 2025
@adamziel adamziel merged commit 420f1aa into trunk Oct 13, 2025
24 checks passed
@adamziel adamziel deleted the rm-packages-when-building branch October 13, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant