@@ -3,37 +3,39 @@ name: Docker Build Validation
33on :
44 push :
55 paths :
6- - ' agent-sdk-server/Dockerfile '
6+ - ' agent-sdk-server/** '
77 pull_request :
88 paths :
9- - ' agent-sdk-server/Dockerfile '
9+ - ' agent-sdk-server/** '
1010
1111jobs :
12- validate-docker :
12+ lint :
1313 runs-on : ubuntu-latest
1414 steps :
1515 - uses : actions/checkout@v4
1616
17- - name : Build and validate file permissions
18- run : |
19- cd agent-sdk-server
20- docker build -t agent-sdk-server:test .
17+ - name : Lint Dockerfile
18+ uses : hadolint/hadolint-action@v3
19+ with :
20+ dockerfile : agent-sdk-server/Dockerfile
2121
22- # Simulate Lambda init - copy from /opt to /tmp
23- docker run --rm agent-sdk-server:test python -c "
24- import shutil
25- from pathlib import Path
22+ build :
23+ runs-on : ubuntu-latest
24+ needs : lint
25+ steps :
26+ - uses : actions/checkout@v4
2627
27- src = Path('/opt/claude-config')
28- dst = Path('/tmp/.claude-code')
29- dst.mkdir(exist_ok=True)
28+ - name : Set up QEMU
29+ uses : docker/setup-qemu-action@v3
3030
31- for item in src.iterdir():
32- target = dst / item.name
33- if item.is_dir():
34- shutil.copytree(item, target, dirs_exist_ok=True)
35- else:
36- shutil.copy2(item, target)
31+ - name : Set up Docker Buildx
32+ uses : docker/setup-buildx-action@v3
3733
38- print('Lambda init simulation: OK')
39- "
34+ - name : Build ARM64 image
35+ uses : docker/build-push-action@v6
36+ with :
37+ context : ./agent-sdk-server
38+ platforms : linux/arm64
39+ push : false
40+ cache-from : type=gha
41+ cache-to : type=gha,mode=max
0 commit comments