Skip to content

Commit cfba19d

Browse files
lucascostiMartin Lopesfelicitymay
authored
Add cache section for Actions REST API (github#24924)
* Add cache section for Actions REST API * Add permissions entries, cache section * Add new cache directory after REST reactify changes * Update content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md Co-authored-by: Martin Lopes <[email protected]> * Add versioning for GHES/AE Co-authored-by: Martin Lopes <[email protected]> Co-authored-by: Felicity Chapman <[email protected]>
1 parent 9dd1b89 commit cfba19d

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,11 @@ For example, if a pull request contains a `feature` branch (the current scope) a
234234
## Usage limits and eviction policy
235235

236236
{% data variables.product.prodname_dotcom %} will remove any cache entries that have not been accessed in over 7 days. There is no limit on the number of caches you can store, but the total size of all caches in a repository is limited to 10 GB. If you exceed this limit, {% data variables.product.prodname_dotcom %} will save your cache but will begin evicting caches until the total size is less than 10 GB.
237+
238+
{% if actions-cache-management %}
239+
240+
## Managing caches
241+
242+
You can use the {% data variables.product.product_name %} REST API to manage your caches. At present, you can use the API to see your cache usage, with more functionality expected in future updates. For more information, see the "[Actions](/rest/reference/actions#cache)" REST API documentation.
243+
244+
{% endif %}

content/rest/overview/permissions-required-for-github-apps.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ _Search_
121121
- [`GET /repos/:owner/:repo/actions/artifacts/:artifact_id`](/rest/reference/actions#get-an-artifact) (:read)
122122
- [`DELETE /repos/:owner/:repo/actions/artifacts/:artifact_id`](/rest/reference/actions#delete-an-artifact) (:write)
123123
- [`GET /repos/:owner/:repo/actions/artifacts/:artifact_id/zip`](/rest/reference/actions#download-an-artifact) (:read)
124+
{% if actions-cache-management -%}
125+
- [`GET /repos/:owner/:repo/actions/cache/usage`](/rest/reference/actions#get-github-actions-cache-usage-for-a-repository) (:read)
126+
{% endif -%}
124127
- [`GET /repos/:owner/:repo/actions/jobs/:job_id`](/rest/reference/actions#get-a-job-for-a-workflow-run) (:read)
125128
- [`GET /repos/:owner/:repo/actions/jobs/:job_id/logs`](/rest/reference/actions#download-job-logs-for-a-workflow-run) (:read)
126129
- [`GET /repos/:owner/:repo/actions/runs`](/rest/reference/actions#list-workflow-runs-for-a-repository) (:read)
@@ -644,6 +647,10 @@ _Teams_
644647
### Permission on "organization administration"
645648

646649
- [`PATCH /orgs/:org`](/rest/reference/orgs#update-an-organization) (:write)
650+
{% if actions-cache-management -%}
651+
- [`GET /orgs/:org/actions/cache/usage`](/rest/reference/actions#get-github-actions-cache-usage-for-an-organization) (:read)
652+
- [`GET /orgs/:org/actions/cache/usage-by-repository`](/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization) (:read)
653+
{% endif -%}
647654
{% ifversion fpt -%}
648655
- [`GET /orgs/:org/interaction-limits`](/rest/reference/interactions#get-interaction-restrictions-for-an-organization) (:read)
649656
{% endif -%}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Reference: #6154
2+
# Documentation for Actions cache management APIs (initial ship)
3+
versions:
4+
fpt: '*'
5+
ghec: '*'
6+
ghes: '> 3.4'
7+
ghae: 'issue-6154'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Cache
2+
3+
The cache API allows you to query and manage the {% data variables.product.prodname_actions %} cache for repositories. For more information, see "[Caching dependencies to speed up workflows](/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy)."

0 commit comments

Comments
 (0)