Copied actions to forgejo, added jj

This commit is contained in:
Tyler Mayoff 2025-08-18 18:45:13 -04:00
parent 096111f117
commit ee1550d10a
5 changed files with 193 additions and 0 deletions

View file

@ -0,0 +1,40 @@
name: "Clear disk space"
description: "Frees disk space in the GHA runner"
inputs:
debug:
description: Enabling this will print before and after disk sizes
default: 'false'
required: false
runs:
using: "composite"
steps:
- name: Get disk usage
shell: bash
run: |
df -h
- name: Detailed usage
if: inputs.debug == 'true'
shell: bash
run: |
du -h -d5 / 2>/dev/null | sort -hr | head -n 20 || true
- name: Clear
shell: bash
run: |
${{ github.action_path }}/clean.sh
sudo docker system prune -af || true
sudo docker image prune -af || true
sudo docker builder prune -af || true
- name: Get disk usage
shell: bash
run: |
df -h
- name: Detailed usage
if: inputs.debug == 'true'
shell: bash
run: |
du -h -d5 / 2>/dev/null | sort -hr | head -n 20 || true

View file

@ -0,0 +1,38 @@
#!/bin/bash
set -x
paths=(
/home/runner/.rustup
/usr/share/dotnet
/usr/share/swift
/usr/share/miniconda
/usr/share/az*
/usr/lib/jvm
/usr/lib/llvm-*
/usr/lib/google-cloud-sdk
/usr/lib/dotnet
/usr/local/.ghcup
/usr/local/share/chromium
/usr/local/share/powershell
/usr/local/lib/android
/usr/local/julia1.11.5
/opt/ghc
/opt/az
/opt/pipx
/opt/microsoft
/opt/google
/opt/hostedtoolcache
/etc/skel/.rustup
)
sudo mkdir /empty
for p in "${paths[@]}"
do
sudo find "$p" -type f -delete &
done
wait
exit 0