delete-gh-workflow-runs
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.
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.