Skip to content

Commit c8673b5

Browse files
pRizzcursoragent
andcommitted
ci(docker): improve build cache usage
Add scoped GHA cache usage for both the test and publish docker builds and bump checkout to the latest major to reduce redundant rebuilds. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 7e5e997 commit c8673b5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
echo "After:"
5151
df -h
5252
53-
- uses: actions/checkout@v4
53+
- uses: actions/checkout@v6
5454
with:
5555
# If ref is not provided: when triggered by tag push, checkout uses the tag automatically;
5656
# when called via workflow_call, defaults to the commit that triggered the workflow
@@ -95,6 +95,8 @@ jobs:
9595
OPENCODE_CLOUD_VERSION=${{ steps.version.outputs.version }}
9696
tags: |
9797
${{ env.IMAGE_NAME_GHCR }}:test
98+
cache-from: type=gha,scope=opencode-cloud-sandbox-test,version=2
99+
cache-to: type=gha,scope=opencode-cloud-sandbox-test,mode=max,version=2
98100

99101
# Temporary disabled smoke test
100102
# - name: Smoke test - verify container starts and becomes healthy
@@ -180,8 +182,8 @@ jobs:
180182
${{ env.IMAGE_NAME_GHCR }}:latest
181183
${{ env.IMAGE_NAME_DOCKERHUB }}:${{ steps.version.outputs.version }}
182184
${{ env.IMAGE_NAME_DOCKERHUB }}:latest
183-
cache-from: type=gha
184-
cache-to: type=gha,mode=max
185+
cache-from: type=gha,scope=opencode-cloud-sandbox,version=2
186+
cache-to: type=gha,scope=opencode-cloud-sandbox,mode=max,version=2
185187

186188
- name: Update Docker Hub description
187189
uses: peter-evans/dockerhub-description@v5

0 commit comments

Comments
 (0)