Skip to content

Commit 89056b4

Browse files
committed
added CI caching
1 parent c12bd3b commit 89056b4

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/deploy.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,25 @@ jobs:
2121
with:
2222
platforms: arm64
2323

24-
- name: Build Docker Image for ARM64
25-
run: docker build --platform linux/arm64 -t build-env .
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v2
26+
27+
- name: Cache Docker layers
28+
uses: actions/cache@v3
29+
with:
30+
path: /tmp/.buildx-cache
31+
key: ${{ runner.os }}-buildx-${{ github.sha }}
32+
restore-keys: |
33+
${{ runner.os }}-buildx-
34+
35+
- name: Build Docker Image for ARM64 with Cache
36+
uses: docker/build-push-action@v5
37+
with:
38+
push: false
39+
tags: build-env:latest
40+
platforms: linux/arm64
41+
cache-from: type=local,src=/tmp/.buildx-cache
42+
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
2643

2744
- name: Run Docker Container for ARM64
2845
run: |

0 commit comments

Comments
 (0)