Skip to content

Commit aed5c34

Browse files
ci: fix docker caching by switching to buildx driver (#124)
## Overview Fixes #123 This PR fixes the Docker caching issues. ### Proposed Changes - Added [`docker/setup-buildx-action`](https://github.com/docker/setup-buildx-action) to enable the `docker-container` driver (required for registry caching). - Restored `cacheTo` in the Pre-build workflow. ### 🛠 Action Required from the owner To resolve the `403 Forbidden` errors and enable the cache, please: 1. Go to the **Package Settings** for `protols/devcontainer`. 2. Change **Package Visibility** to **Public**. 3. Under **Manage Actions access**, ensure the repository is added with at least **Read** access. Once these steps are completed, the `cacheFrom` and `cacheTo` instructions will hopefully become fully operational. --------- Co-authored-by: Ashar <coder3101@users.noreply.github.com>
1 parent d167f72 commit aed5c34

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "Rust",
3-
"image": "ghcr.io/coder3101/protols/devcontainer:latest",
43
"build": {
54
"dockerfile": "Dockerfile",
6-
"context": ".."
5+
"context": "..",
6+
"cacheFrom": "ghcr.io/coder3101/protols/devcontainer:latest"
77
},
88
"features": {
99
"ghcr.io/devcontainers/features/rust:1": {

.github/workflows/prebuild_devcontainer.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ jobs:
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v6
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v4
2325
- name: Pre-build and push
2426
uses: devcontainers/ci@v0.3
2527
with:
2628
imageName: ghcr.io/${{ github.repository }}/devcontainer
2729
cacheFrom: ghcr.io/${{ github.repository }}/devcontainer
30+
cacheTo: ghcr.io/${{ github.repository }}/devcontainer
2831
push: filter
2932
refFilterForPush: refs/heads/main
3033
eventFilterForPush: push, workflow_dispatch

0 commit comments

Comments
 (0)