Purge GitHub Actions artifacts.
cd
GO111MODULE=on go get github.com/pmatseykanets/gh-tools/cmd/gh-purge-artifacts@latest
Usage: gh-purge-artifacts [flags] [owner][/repo]
owner Repository owner (user or organization)
repo Repository
Flags:
-help Print this information and exit
-dry-run Dry run
-no-repo= The pattern to reject repository names
-repo The pattern to match repository names
-token Prompt for an Access Token
-version Print the version and exit
GHTOOLS_TOKEN
and GITHUB_TOKEN
in the order of precedence can be used to set a GitHub access token.
Single repository mode:
gh-purge-artifacts owner/repo
Purge artifacts in all repositories
gh-purge-artifacts owner
Purge artifacts in repositories starting with 'api'
gh-purge-artifacts -repo '^api' owner
Dry-run mode. List found atifacts but don't purge.
gh-purge-artifacts -dry-run owner