Skip to content

Set GitHub Actions cache storage limit for a repository

PUT
/repos/{owner}/{repo}/actions/cache/storage-limit

Sets GitHub Actions cache storage limit for a repository. This determines the maximum size of caches that can be stored before eviction occurs.

OAuth tokens and personal access tokens (classic) need the admin:repository scope to use this endpoint.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

Media type application/json
Actions cache storage limit for a repository

GitHub Actions cache storage policy for a repository.

object
max_cache_size_gb

The maximum total cache size for this repository, in gigabytes.

integer
Examples
Example selected_actions
{
"max_cache_size_gb": 150
}

Response

Bad Request

Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}