Skip to content

Commit 8aad938

Browse files
committed
Enhance Docker build workflow with BuildX and caching
Add Docker BuildX platform support and implement GitHub Actions cache for faster, more efficient Docker image builds for gas-station and streamr-destination components
1 parent fc017d3 commit 8aad938

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/docker-build-publish.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ jobs:
2626
- name: Checkout repository
2727
uses: actions/checkout@v4
2828

29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
with:
32+
platforms: linux/amd64
33+
2934
- name: Log in to the Container registry
3035
uses: docker/login-action@v3
3136
with:
@@ -61,16 +66,20 @@ jobs:
6166
uses: docker/build-push-action@v5
6267
with:
6368
context: .
64-
build-args: path=sources/gas-station
6569
push: true
70+
build-args: path=sources/gas-station
6671
tags: ${{ steps.meta-gas.outputs.tags }}
6772
labels: ${{ steps.meta-gas.outputs.labels }}
73+
cache-from: type=gha,scope=gas-station
74+
cache-to: type=gha,mode=max,scope=gas-station
6875

6976
- name: Build and push Streamr Destination image
7077
uses: docker/build-push-action@v5
7178
with:
7279
context: .
73-
build-args: path=destinations/streamr-destination
7480
push: true
81+
build-args: path=destinations/streamr-destination
7582
tags: ${{ steps.meta-streamr.outputs.tags }}
76-
labels: ${{ steps.meta-streamr.outputs.labels }}
83+
labels: ${{ steps.meta-streamr.outputs.labels }}
84+
cache-from: type=gha,scope=streamr-destination
85+
cache-to: type=gha,mode=max,scope=streamr-destination

0 commit comments

Comments
 (0)