Skip to content

Commit 2f787e1

Browse files
authored
build: note about sunset of gha cache v1 (#22395)
## Description Note about sunset of GitHub Cache service v1 on April 15th, 2025. ## Related issues or tickets * https://gh.io/gha-cache-sunset * docker/build-push-action#1345 * docker/setup-buildx-action#414 * moby/buildkit#5896 * actions/runner-images#11766 (comment) ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [x] Technical review - [x] Editorial review - [ ] Product review Signed-off-by: CrazyMax <[email protected]>
1 parent 284b9bc commit 2f787e1

File tree

1 file changed

+60
-2
lines changed
  • content/manuals/build/ci/github-actions

1 file changed

+60
-2
lines changed

content/manuals/build/ci/github-actions/cache.md

+60-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ jobs:
8787
{{< summary-bar feature_name="Cache backend API" >}}
8888
8989
The [GitHub Actions cache exporter](../../cache/backends/gha.md)
90-
backend uses the [GitHub Cache API](https://github.com/tonistiigi/go-actions-cache/blob/master/api.md)
90+
backend uses the [GitHub Cache service API](https://github.com/tonistiigi/go-actions-cache)
9191
to fetch and upload cache blobs. That's why you should only use this cache
92-
backend in a GitHub Action workflow, as the `url` (`$ACTIONS_CACHE_URL`) and
92+
backend in a GitHub Action workflow, as the `url` (`$ACTIONS_RESULTS_URL`) and
9393
`token` (`$ACTIONS_RUNTIME_TOKEN`) attributes only get populated in a workflow
9494
context.
9595

@@ -121,6 +121,64 @@ jobs:
121121
cache-to: type=gha,mode=max
122122
```
123123

124+
> [!IMPORTANT]
125+
>
126+
> Starting [April 15th, 2025, only GitHub Cache service API v2 will be supported](https://gh.io/gha-cache-sunset).
127+
>
128+
> If you encounter the following error during your build:
129+
>
130+
> ```console
131+
> ERROR: failed to solve: This legacy service is shutting down, effective April 15, 2025. Migrate to the new service ASAP. For more information: https://gh.io/gha-cache-sunset
132+
> ```
133+
>
134+
> You're probably using outdated tools that only support the legacy GitHub
135+
> Cache service API v1. Here are the minimum versions you need to upgrade to
136+
> depending on your use case:
137+
> * Docker Buildx >= v0.21.0
138+
> * BuildKit >= v0.20.0
139+
> * Docker Compose >= v2.33.1
140+
> * Docker Engine >= v28.0.0 (if you're building using the Docker driver with containerd image store enabled)
141+
>
142+
> If you're building using the `docker/build-push-action` or `docker/bake-action`
143+
> actions on GitHub hosted runners, Docker Buildx and BuildKit are already up
144+
> to date but on self-hosted runners, you may need to update them yourself.
145+
> Alternatively, you can use the `docker/setup-buildx-action` action to install
146+
> the latest version of Docker Buildx:
147+
>
148+
> ```yaml
149+
> - name: Set up Docker Buildx
150+
> uses: docker/setup-buildx-action@v3
151+
> with:
152+
> version: latest
153+
> ```
154+
>
155+
> If you're building using Docker Compose, you can use the
156+
> `docker/setup-compose-action` action:
157+
>
158+
> ```yaml
159+
> - name: Set up Docker Compose
160+
> uses: docker/setup-compose-action@v1
161+
> with:
162+
> version: latest
163+
> ```
164+
>
165+
> If you're building using the Docker Engine with the containerd image store
166+
> enabled, you can use the `docker/setup-docker-action` action:
167+
>
168+
> ```yaml
169+
> -
170+
> name: Set up Docker
171+
> uses: docker/setup-docker-action@v4
172+
> with:
173+
> version: latest
174+
> daemon-config: |
175+
> {
176+
> "features": {
177+
> "containerd-snapshotter": true
178+
> }
179+
> }
180+
> ```
181+
124182
### Cache mounts
125183

126184
BuildKit doesn't preserve cache mounts in the GitHub Actions cache by default.

0 commit comments

Comments
 (0)