delete-gh-workflow-runs

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2024 License: MIT

README

delete-gh-workflow-runs

Go Report Card Go Reference Github Downloads

Table of contents

Description

delete-gh-workflow-runs is a command-line tool that deletes GitHub Actions workflow runs based on the provided input.

Installation

Homebrew
brew tap christosgalano/christosgalano
brew install delete-gh-workflow-runs
Go
go install github.com/christosgalano/delete-gh-workflow-runs/cmd/delete-gh-workflow-runs@latest
Binary

Download the latest binary from the releases page.

Requirements

To run delete-gh-workflow-runs, you must have a GitHub token with the repo scope and workflow permissions.

Permissions

Usage

delete-gh-workflow-runs is a command-line tool that deletes GitHub Actions workflow runs based on the provided input.

Arguments:

  • --owner - The owner of the repository.
  • --repo - The name of the repository.
  • --workflow - The name of the workflow or "all" to delete all workflow runs; default is "all".
  • --token - The GitHub token.
Example usage

Delete the runs of a specific workflow:

delete-gh-workflow-runs --owner {owner} --repo {repo} --workflow {workflow} --token {token}

Delete all workflow runs of a repository:

delete-gh-workflow-runs --owner {owner} --repo {repo} --token {token}

GitHub Action

You can use this tool as a GitHub Action. Here is an example:

Syntax
uses: christosgalano/delete-gh-workflow-runs@v1.0.0
with:
  owner: ${{ github.repository_owner }}   # The owner of the repository
  repo: ...                               # The name of the repository
  workflow: "all"                         # The name of the workflow or "all" to delete all workflow runs
  token: ${{ github.TOKEN }}              # The GitHub token
Examples

Delete the runs of a specific workflow:

- name: Delete workflow runs
  uses: christosgalano/delete-gh-workflow-runs@v1.0.0
  with:
    owner: ${{ github.repository_owner }}
    repo: ${{ inputs.repository }}
    workflow: ${{ inputs.workflow }}
    token: ${{ github.TOKEN }}

Delete all workflow runs of a repository:

- name: Delete all workflow runs
  uses: christosgalano/delete-gh-workflow-runs@v1.0.0
  with:
    owner: ${{ github.repository_owner }}
    repo: ${{ inputs.repository }}
    token: ${{ github.TOKEN }}

Contributing

Information about contributing to this project can be found here.

License

This project is licensed under the MIT License.

Directories

Path Synopsis
cmd
internal
cli
Package cli provides a command-line interface (CLI) for the delete-gh-workflow-runs tool, utilizing cobra-cli.
Package cli provides a command-line interface (CLI) for the delete-gh-workflow-runs tool, utilizing cobra-cli.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL