hugoalh/disk-space-optimizer-ghaction
A GitHub Action to optimize disk space for GitHub hosted runner.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.8%) to scientific vocabulary
Keywords
Repository
A GitHub Action to optimize disk space for GitHub hosted runner.
Basic Info
Statistics
- Stars: 9
- Watchers: 2
- Forks: 8
- Open Issues: 1
- Releases: 13
Topics
Metadata Files
README.md
Disk Space Optimizer (GitHub Action)
A GitHub Action to optimize the disk space for the GitHub hosted GitHub Actions runner.
This project is inspired from:
[!IMPORTANT] - This documentation is v0.8.0 based; To view other version's documentation, please visit the versions list and select the correct version.
🌟 Features
- Always continue on error to not breaking any process.
- Support all of the platforms.
- Support multiple types:
- APT caches
- APT packages
- Chocolatey packages
- Directly bundled programs
- Docker caches
- Docker images
- Homebrew caches
- Homebrew packages
- NPM caches
- NPM packages
- OS page/swap file
- Pipx packages
- Windows programs (WMIC)
🔰 Begin
🎯 Targets
| | GitHub | |:--|:--| | GitHub Actions | ✔️ |
[!NOTE] - It is possible to use this action in other methods/ways which not listed in here, however those methods/ways are not officially supported, and should beware maybe cause security issues.
#️⃣ Registries Identifier
- GitHub:
hugoalh/disk-space-optimizer-ghaction[@{Tag}]
[!NOTE] - It is recommended to use this action with tag for immutability.
🛡️ GitHub Token Permissions
This action does not request any GitHub token permission.
🧩 Inputs
[!NOTE] - All of the inputs are optional; Use this action without any input will default to do nothing.
| Legend | Description | |:-:|:--| | 🔀 | Switch with groups (e.g.:
{E}). |
operate_async
{Boolean = False} Whether to operate in asynchronously, possibly reduce the operation duration.
operate_sudo
{Boolean = False} Whether to execute this action in sudo mode in order to able operate protected resources on the non-Windows environment.
general_include
{RegEx[]} Remove items which listed in the list, by regular expression of the item name, separate each value per line.
general_exclude
{RegEx[]} Exclude remove items which listed in the list, by regular expression of the item name, separate each value per line.
docker_include
{RegEx[]} Remove Docker images, by regular expression of the Docker image name, separate each value per line.
docker_exclude
{RegEx[]} Exclude remove Docker images, by regular expression of the Docker image name, separate each value per line.
docker_prune
{Boolean = False} Whether to prune Docker all of the dangling images.
docker_clean
{Boolean = False} Whether to remove Docker cache, include all of the:
- build caches
- stopped/unused containers
- dangling and/or unreferenced images
- unused networks
apt_enable
🔀{E} {Boolean = False} Whether to optimize via APT. Only affect items which listed in the list.
If all of the inputs inside this switch group are false, this input will default to true.
apt_prune
{Boolean = False} Whether to prune APT all of the packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.
apt_clean
{Boolean = False} Whether to remove APT cache, include the local repository of retrieved package files.
chocolatey_enable
🔀{E} {Boolean = False} Whether to optimize via Chocolatey. Only affect items which listed in the list.
If all of the inputs inside this switch group are false, this input will default to true.
homebrew_enable
🔀{E} {Boolean = False} Whether to optimize via Homebrew. Only affect items which listed in the list.
If all of the inputs inside this switch group are false, this input will default to true.
homebrew_prune
{Boolean = False} Whether to prune Homebrew all of the packages that were only installed as a dependency of other packages and are now no longer needed.
homebrew_clean
{Boolean = False} Whether to remove Homebrew cache, include all of the:
- outdated downloads
- old versions of installed formulae
- stale lock files
npm_enable
🔀{E} {Boolean = False} Whether to optimize via NPM. Only affect items which listed in the list.
If all of the inputs inside this switch group are false, this input will default to true.
npm_prune
{Boolean = False} Whether to prune NPM all of the extraneous packages.
npm_clean
{Boolean = False} Whether to remove NPM cache.
pipx_enable
🔀{E} {Boolean = False} Whether to optimize via Pipx. Only affect items which listed in the list.
If all of the inputs inside this switch group are false, this input will default to true.
wmic_enable
🔀{E} {Boolean = False} Whether to optimize via WMIC. Only affect items which listed in the list.
If all of the inputs inside this switch group are false, this input will default to true.
fs_enable
🔀{E} {Boolean = False} Whether to optimize via file system.
If all of the inputs inside this switch group are false, this input will default to true.
os_swap
{Boolean = False} Whether to remove system page/swap file.
🧩 Outputs
This action does not have any output.
✍️ Example
yml jobs: job_id: runs-on: "ubuntu-latest" steps: - name: "Optimize Disk Space" uses: "hugoalh/disk-space-optimizer-ghaction@v0.8.0" with: operate_sudo: "True" general_include: ".+" docker_include: ".+" docker_prune: "True" docker_clean: "True" apt_prune: "True" apt_clean: "True" homebrew_prune: "True" homebrew_clean: "True" npm_prune: "True" npm_clean: "True" os_swap: "True"
📚 Guides
- GitHub Actions
Owner
- Name: hugoalh
- Login: hugoalh
- Kind: user
- Location: Everywhere
- Company: @hugoalh-studio
- Twitter: hugoalhofficial
- Repositories: 12
- Profile: https://github.com/hugoalh
Lead of @hugoalh-studio; Full time software developer; Part time freelancer
Citation (CITATION.cff)
# yaml-language-server: $schema=https://citation-file-format.github.io/1.2.0/schema.json cff-version: "1.2.0" title: "Disk Space Optimizer (GitHub Action)" message: "If you use this software, please cite it using the metadata from this file." type: "software" authors: - name: "hugoalh" repository-code: "https://github.com/hugoalh/disk-space-optimizer-ghaction" keywords: - "disk" - "gh-action" - "ghaction" - "github-action" - "optimize" license: "MIT"
GitHub Events
Total
- Watch event: 2
- Delete event: 2
- Issue comment event: 3
- Push event: 4
- Pull request event: 6
- Fork event: 1
- Create event: 4
Last Year
- Watch event: 2
- Delete event: 2
- Issue comment event: 3
- Push event: 4
- Pull request event: 6
- Fork event: 1
- Create event: 4
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 0
- Total pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: about 1 month
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 7
Past Year
- Issues: 0
- Pull requests: 5
- Average time to close issues: N/A
- Average time to close pull requests: about 1 month
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 5
Top Authors
Issue Authors
Pull Request Authors
- dependabot[bot] (13)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 22
github actions: hugoalh/disk-space-optimizer-ghaction
Optimize disk space for GitHub hosted runner.
- License: other
-
Latest release: v0.8.1
published almost 2 years ago
Rankings
Dependencies
- hugoalh/disk-space-optimizer-ghaction main composite
- hugoalh-studio/setup-powershell-toolkit-ghaction v1.6.0 composite