delete-gh-workflow-runs is a command-line tool that deletes GitHub Actions workflow runs based on the provided input.
brew tap christosgalano/christosgalano
brew install delete-gh-workflow-runs
go install github.com/christosgalano/delete-gh-workflow-runs/cmd/delete-gh-workflow-runs@latest
Download the latest binary from the releases page.
To run delete-gh-workflow-runs, you must have a GitHub token with the repo
scope and workflow
permissions.
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.
NOTE: Only 'completed' workflow runs are considered for deletion.
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}
You can use this tool as a GitHub Action. Here is an example:
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
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 }}
Information about contributing to this project can be found here.
This project is licensed under the MIT License.