Skip to content

Instantly share code, notes, and snippets.

@dudadornelles
Created July 12, 2022 20:44
Show Gist options
  • Save dudadornelles/eacf6f3a796a0b509fac9ef9a7da59b9 to your computer and use it in GitHub Desktop.
Save dudadornelles/eacf6f3a796a0b509fac9ef9a7da59b9 to your computer and use it in GitHub Desktop.
#!/bin/bash
GH_API=https://api.github.com
gh_get() {
curl \
-H "Accept: application/vnd.github+json" -H "Authorization: token $GITHUB_ACCESS_TOKEN" \
$1
}
gh_delete() {
curl \
-X DELETE \
-H "Accept: application/vnd.github+json" -H "Authorization: token $GITHUB_ACCESS_TOKEN" \
$1
}
# get the caches, find the key you want to delete
# gh_get "$GH_API/repos/ORG/REPO/actions/caches?per_page=100"
# delete the key
# gh_delete "$GH_API/repos/ORG/REPO/actions/caches?key=KEY"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment