What changed, and why it matters
This commit adds a GitHub Actions cleanup step that deletes large pre-installed software folders (like .NET, Android SDK, Node modules) on CentOS CI runners to free disk space. It only affects Bitcoin Core's own continuous integration environment and does not change any Bitcoin node code, wallet logic, or network behavior. There is no security issue in the change itself.
No security action needed. Reviewers may want to confirm the deleted paths are still safe to remove on current GitHub-hosted runner images and that the backgrounded `rm -rf` does not race with later build steps.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A new composite action .github/actions/clear-files/action.yml runs rm -rf against several GitHub-hosted runner directories (/usr/share/dotnet/, /usr/local/graalvm/, /usr/local/.ghcup/, /usr/local/share/powershell, /usr/local/share/chromium, /usr/local/lib/android, /usr/local/lib/node_modules) with low I/O and CPU priority. The action is invoked in .github/workflows/ci.yml only when the CI cache provider is gha (GitHub Actions). The command is backgrounded and errexit is disabled, so failures are non-fatal. This is purely a CI maintenance change to avoid out-of-space errors during the CentOS job.
Changed components
.github/workflows/ci.yml.github/actions/clear-files/action.ymlInspect captured patch +16 / −0
diff --git a/.github/actions/clear-files/action.yml b/.github/actions/clear-files/action.yml
new file mode 100644
index 00000000..0008f825
--- /dev/null
+++ b/.github/actions/clear-files/action.yml
@@ -0,0 +1,12 @@
+name: 'Clear unnecessary files'
+description: 'Clear out unnecessary files to make space on the VM'
+runs:
+ using: 'composite'
+ steps:
+ - name: Clear unnecessary files
+ shell: bash
+ env:
+ DEBIAN_FRONTEND: noninteractive
+ run: |
+ set +o errexit
+ sudo bash -c '(ionice -c 3 nice -n 19 rm -rf /usr/share/dotnet/ /usr/local/graalvm/ /usr/local/.ghcup/ /usr/local/share/powershell /usr/local/share/chromium /usr/local/lib/android /usr/local/lib/node_modules)&'
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 23e2f927..0f504481 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -582,6 +582,10 @@ jobs:
with:
cache-provider: ${{ matrix.provider || needs.runners.outputs.provider }}
+ - name: Clear unnecessary files
+ if: ${{ needs.runners.outputs.provider == 'gha' && true || false }} # Only needed on GHA runners
+ uses: ./.github/actions/clear-files
+
- name: Enable bpfcc script
if: ${{ env.CONTAINER_NAME == 'ci_native_asan' }}
# In the image build step, no external environment variables are available,
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.