Skip to content

Commit 2307219

Browse files
committed
feat: update Dockerfile.local-da and docker-compose for local-da image build and caching
1 parent ee1291a commit 2307219

3 files changed

Lines changed: 18 additions & 6 deletions

File tree

.github/integration-tests/docker-compose.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
services:
22
local-da:
3-
build:
4-
context: ../..
5-
dockerfile: .github/integration-tests/docker/Dockerfile.local-da
6-
args:
7-
EV_DA_REF: ${EVNODE_DA_VERSION:-v1.0.0-beta.1}
3+
image: local-da:latest
84
container_name: rollkit-local-da
95
command: ["local-da", "-listen-all"]
106
ports:

.github/integration-tests/docker/Dockerfile.local-da

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Build local-da from ev-node source
22
FROM golang:1.24-alpine AS builder
33

4-
# Install build dependencies
4+
# Install build dependencies - this layer will be cached
55
RUN apk add --no-cache gcc musl-dev git
66

77
# Set working directory
88
WORKDIR /workspace
99

1010
# Build local-da from rollkit module at the requested version (tag/branch/pseudo-version)
11+
# This layer will be cached if EV_DA_REF doesn't change
1112
ARG EV_DA_REF=main
1213
RUN GOBIN=/workspace go install github.com/rollkit/rollkit/da/cmd/local-da@${EV_DA_REF}
1314

.github/workflows/attester-mode-integration-test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727

28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
31+
- name: Build and cache local-da image
32+
uses: docker/build-push-action@v6
33+
with:
34+
context: .
35+
file: .github/integration-tests/docker/Dockerfile.local-da
36+
tags: local-da:latest
37+
load: true
38+
build-args: |
39+
EV_DA_REF=${{ env.EVNODE_DA_VERSION }}
40+
cache-from: type=gha,scope=local-da
41+
cache-to: type=gha,mode=max,scope=local-da
42+
2843
- name: Run integration tests (compose orchestrator)
2944
env:
3045
VERBOSE: "true"

0 commit comments

Comments
 (0)