mirror of
https://codeberg.org/tmayoff/.dotfiles.git
synced 2025-12-06 08:48:34 -05:00
Copied actions to forgejo, added jj
This commit is contained in:
parent
096111f117
commit
ee1550d10a
5 changed files with 193 additions and 0 deletions
40
.forgejo/actions/disk_space/action.yml
Normal file
40
.forgejo/actions/disk_space/action.yml
Normal 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
|
||||
38
.forgejo/actions/disk_space/clean.sh
Executable file
38
.forgejo/actions/disk_space/clean.sh
Executable 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue