Giter Club home page Giter Club logo

slimhub_actions's Introduction

GitHub Workflow Cleaner Action

rokibhasansagar/slimhub_actions@main

Release Version GitHub last commit Status GitHub Workflow Status License Stargazers

A Simple Composite Action to Clean GitHub Actions Workflow Environment to Bare Minimum.

When you don't really need any extra software rather than core functions of Ubuntu itself, you would want to use this.

Github Actions give you a 84GB storage drive which is loaded up to around 62GB with lots of programs inbuilt. That gives you only 22GB playground. But with this action, you can gain up to 80GB! Isn't that awesome?!


How To Use The Project

Your Workflow must run on Ubuntu Runners, ubuntu-20.04 (focal) and ubuntu-22.04/ubuntu-latest (jammy) are supported for now, ubuntu-18.04 (bionic) is not available any more.

If you need some of the programs to be kept back, you can use retain input key with the actions step. You can put multiple values separated by comma/space. See below section to know the values for retention of your specific programs.

# ...
jobs:
  slim_build:
    runs-on: ubuntu-latest
    # You can use either of the ubuntu-20.04 or ubuntu-22.04 runner
    steps:
      # You might want to Checkout your repo first, but not mandatory
      - uses: actions/checkout@v3
      # Cleanup The Actions Workspace Using Custom Composite Run Actions
      - uses: rokibhasansagar/slimhub_actions@main
        # Optional key, "retain": Use only if you want something to keep
        with:
          retain: "prg_grp_1,prg_grp_2,another_prg_grp"
          # The values must match from the below list
      # That's it! Now use your normal steps
      - name: "Custom Steps"
        run: |
          echo "Your Commands Goes HERE"
      # ...

Which Programs Can Be Removed

The following list shows which program groups can be kept back. Some of the group has sub-groups in them, so if any base group is removed, all sub-groups will be removed.

List of Program Groups and Sub-groups

- homebrew
- docker_imgcache
- docker_buildkit
  + docker_imgcache
- container_tools
- android_sdk
- java_tools
  + toolcache_java
- database
- browser_all
  + browser_firefox
  + browser_chrome
  + browser_edge
- xvfb
- webservers
- php
- cloud_cli
- vcs
- vim
- dotnet
- vcpkg
- mono
- ruby
  + toolcache_ruby
- nodejs_npm
  + toolcache_node
- pipx
- toolcache_all
  + toolcache_codeql
  + toolcache_java
  + toolcache_pypy
  + toolcache_python
  + toolcache_ruby
  + toolcache_go
  + toolcache_node
- compiler_all
  + compiler_gcc
  + compiler_gfortran
  + compiler_llvm_clang
  + compiler_cmake
- powershell
- rust
- haskell
- rlang
- kotlin
- julia
- swift
- snapd
- manpages
- libgtk

Example Usage

To explain the nested list, let's say you want to retain all the browsers. So, you need to use browser_all in retain input key. Then all the browsers (firefox, chrome, edge) will be kept back.

  - uses: rokibhasansagar/slimhub_actions@main
    with:
      retain: "browser_all"

But if you want only firefox and not the rest, you need to use browser_firefox in retain input key.

  - uses: rokibhasansagar/slimhub_actions@main
    with:
      retain: "browser_firefox"

You can use multiple program group names separated by comma in retain input key as necessary.

  - uses: rokibhasansagar/slimhub_actions@main
    with:
      retain: "browser_firefox,powershell"

Explanation of the Program Group names and details

  • android_sdk
    • Android SDK, NDK, Emulator, etc.
  • browser_all
    • browser_chrome
      • Google Chrome and Chromium Browser, chromedriver
    • browser_edge
      • Microsoft Edge Browser, msedgedriver
    • browser_firefox
      • Mozilla Firefox Browser, geckodriver
  • cloud_cli
    • Azure and AWS CLI Tools, GCloud CLI, etc.
  • compiler_all
    • compiler_cmake
      • Local Installation of CMake
    • compiler_gcc
      • GNU C/C++ compiler
    • compiler_gfortran
      • GNU Fortran 95 compiler
    • compiler_llvm_clang
      • Modular C, C++ and Objective-C compiler as-well-as toolchain
  • container_tools
    • podman, buildah, skopeo, kubernetes tools, hashicorp terraform, etc.
  • database
    • postgresql, mysql, mongodb, sphinxsearch, etc.
  • docker_buildkit
    • Entire Docker System with Engine, Docker Compose, moby-buildx, moby-cli, etc.
    • docker_imgcache
      • alpine, buildpack-deps, debian, ubuntu, etc. images for docker
  • dotnet
    • Microsoft .Net Runtime, SDK, etc.
  • haskell
    • Haskell, ghcup, etc.
  • homebrew
    • Homebrew Package Manager
  • java_tools
    • Temurin/Zulu/Adopt openjdk, graalvm, selenium server, gradle, maven, ant, etc.
  • julia
    • Julialang, etc.
  • kotlin
    • JetBrains kotlin Compiler
  • libgtk
    • libgtk-3*, ubuntu-mono, *-icon-theme, etc. packages
  • manpages
    • Manual Pages for various Programs
  • mono
    • mono-complete, msbuild, nuget, etc. packages
  • nodejs_npm
    • NodeJS, NVM and NPM/NPX with other packages
  • php
    • PHP 7.x and/or 8.x with composer
  • pipx
    • Python pipx package manager with their packages
  • powershell
    • Microsoft Powershell Core 7.x
  • rlang
    • R Lang
  • ruby
    • Ruby and gem packages
  • rust
    • Rust Lang and cargo tools, etc.
  • snapd
    • Snap packages and snapd service manager
  • swift
    • Apple Swift Compiler and tools
  • toolcache_all
    • toolcache_codeql
      • Local toolcache for CodeQL
    • toolcache_go
      • Local toolcache for GoLang
    • toolcache_java
      • Local toolcache for Java JRE/JDK
    • toolcache_node
      • Local toolcache for NodeJS
    • toolcache_pypy
      • Local toolcache for PyPy
    • toolcache_python
      • Local toolcache for Python
    • toolcache_ruby
      • Local toolcache for Ruby
  • vcpkg
    • Microsoft VCPKG package manager
  • vcs
    • gh, hub, mercurial, subversion (svn), etc. version control system (git, git-lfs, etc. excluded)
  • vim
    • Vi IMproved editor
  • webservers
    • Apache2, Nginx web servers
  • xvfb
    • Virtual Framebuffer 'fake' X server

A Humble Pledge

I worked tirelessly on finding which programs are installed how and/or where, and what are their purpose, what would happen if I remove them, how can I remove them, and such operations, with many trial-and-error method. It took countless hours to perfect the script to this level.

So, I pledge to you beneficiaries that you show your appreciation to my work by giving the Project Repository a Star.

Disclaimer

GitHub Workflow Cleaner Action basically uninstalls/removes specific programs and files/folders to free up space in the given workspace. If you don't know how it works, then please try this at your own risk.

I won't be responsible for any damage or loss. Don't come crying if any further steps fail due to Exit Code 127 or command not found. You have to manually install every prerequisite programs which would seem to be unavailable to run your particular script(s).

See the script itself to know exactly how the script works.

License

Copyright (c) 2021-2023 Rokib Hasan Sagar

The script and documentation in this project are released under the MIT License

slimhub_actions's People

Contributors

rokibhasansagar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slimhub_actions's Issues

background execution problem

When i try to download the script, and run as
chmod +x cleanup.sh && ./cleanup.sh &
then after sometimes, it stops running. Probably before homebrew removing,,

any way to fix it??

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.