Skip to content

Commit 8f79d01

Browse files
committed
Use docker buildx to cache docker image in CI
1 parent 4911a88 commit 8f79d01

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,16 @@ jobs:
1515
steps:
1616
- name: Check out code
1717
uses: actions/checkout@v3
18-
- name: Set up docker image
19-
run: docker build -t volta .
20-
working-directory: ./ci/docker
18+
- name: Set up docker buildx
19+
uses: docker/setup-buildx-action@v2
20+
- name: Build docker image
21+
uses: docker/build-push-action@v3
22+
with:
23+
cache-from: type=gha
24+
cache-to: type=gha,mode=max
25+
context: ./ci/docker
26+
push: true
27+
tags: volta
2128
- name: Compile and package Volta
2229
run: docker run --volume ${PWD}:/root/workspace --workdir /root/workspace --rm --init --tty volta /root/workspace/ci/build-linux.sh volta-linux
2330
- name: Upload release artifact

0 commit comments

Comments
 (0)