Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pierluigi/gha-cleanup

A simple NodeJS CLI script to list and delete action artifacts in bulk
https://github.com/pierluigi/gha-cleanup

actions nodejs-cli

Last synced: 19 days ago
JSON representation

A simple NodeJS CLI script to list and delete action artifacts in bulk

Awesome Lists containing this project

README

        

# gha-cleanup - Clean up GitHub Actions artifacts

List and delete artifacts created by GitHub Actions in your repository.
Requires a Personal Access Token with full repo permissions.

![Screenshot](screenshot.png?raw=true "Script in action")

# Instructions

```
yarn install
npm link // Optional step. Call ./cli.js instead

// Options can be supplied interactively or via flags

$ gha-cleanup --help
Usage: gha-cleanup [options]

Options:
-t, --token Your GitHub PAT
-u, --user Your GitHub username
-r, --repo Repository name
-h, --help output usage information

```

# Configuration

You can pass the PAT and username directly from the prompt. To avoid repeating yourself all the time, create a .env file in the root (don't worry, it will be ignored by git) and set:

```
$GH_PAT=
$GH_USER=
```

Then you can simply invoke `gha-cleanup` and confirm the prefilled values.