Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pkg-pr-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ jobs:
tags: cloudflare/sandbox:${{ steps.package-version.outputs.version }}
cache-from: |
type=gha,scope=preview-pr-${{ github.event.pull_request.number }}
type=gha,scope=pr-${{ github.event.pull_request.number }}
type=gha,scope=pr-${{ github.event.pull_request.number }}-amd64
type=gha,scope=release-amd64
type=gha,scope=release
cache-to: type=gha,mode=max,scope=preview-pr-${{ github.event.pull_request.number }}
build-args: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,13 @@ jobs:
with:
context: .
file: packages/sandbox/Dockerfile
platforms: linux/amd64 # Explicit single-arch for compatibility with release-amd64 cache
load: true # Load into Docker daemon for local testing
tags: cloudflare/sandbox-test:${{ needs.unit-tests.outputs.version || '0.0.0' }}
cache-from: |
type=gha,scope=pr-${{ github.event.pull_request.number }}
type=gha,scope=release
cache-to: type=gha,mode=max,scope=pr-${{ github.event.pull_request.number }}
type=gha,scope=pr-${{ github.event.pull_request.number }}-amd64
type=gha,scope=release-amd64
cache-to: type=gha,mode=max,scope=pr-${{ github.event.pull_request.number }}-amd64
build-args: |
SANDBOX_VERSION=${{ needs.unit-tests.outputs.version || '0.0.0' }}

Expand Down
32 changes: 30 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,18 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and cache single-arch image (for PR cache reuse)
uses: docker/build-push-action@v6
with:
context: .
file: packages/sandbox/Dockerfile
platforms: linux/amd64
push: false # Don't push, just cache
cache-from: type=gha,scope=release-amd64
cache-to: type=gha,mode=max,scope=release-amd64
build-args: |
SANDBOX_VERSION=${{ needs.unit-tests.outputs.version }}

- name: Build and push Docker image (beta)
uses: docker/build-push-action@v6
with:
Expand All @@ -121,7 +133,9 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: cloudflare/sandbox:${{ needs.unit-tests.outputs.version }}-beta
cache-from: type=gha,scope=release
cache-from: |
type=gha,scope=release-amd64
type=gha,scope=release
cache-to: type=gha,mode=max,scope=release
build-args: |
SANDBOX_VERSION=${{ needs.unit-tests.outputs.version }}
Expand Down Expand Up @@ -170,6 +184,18 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and cache single-arch image (for PR cache reuse)
uses: docker/build-push-action@v6
with:
context: .
file: packages/sandbox/Dockerfile
platforms: linux/amd64
push: false # Don't push, just cache
cache-from: type=gha,scope=release-amd64
cache-to: type=gha,mode=max,scope=release-amd64
build-args: |
SANDBOX_VERSION=${{ needs.unit-tests.outputs.version }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
Expand All @@ -178,7 +204,9 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: cloudflare/sandbox:${{ needs.unit-tests.outputs.version }}
cache-from: type=gha,scope=release
cache-from: |
type=gha,scope=release-amd64
type=gha,scope=release
cache-to: type=gha,mode=max,scope=release
build-args: |
SANDBOX_VERSION=${{ needs.unit-tests.outputs.version }}
Expand Down
Loading