---
title: "Set GitHub Actions cache storage limit for a repository"
method: PUT
path: "/repos/{owner}/{repo}/actions/cache/storage-limit"
tags: ["actions"]
---

# 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.

## Path parameters

- `owner` string, required
- `repo` string, required

## Request body

- ActionsCacheStorageLimitForRepository — GitHub Actions cache storage policy for a repository.
  - `max_cache_size_gb` integer — The maximum total cache size for this repository, in gigabytes.

## Response `204`

Response

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Resource not found

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
