Skip to content

Commit 32a8f19

Browse files
authored
Merge pull request #19 from BWibo/fix-docker-workflow
Fix docker workflow
2 parents ba66f33 + 11adf5d commit 32a8f19

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

.github/workflows/docker-build-push-edge.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@ on:
77
- main
88
env:
99
IMAGE_NAME: citydb-tool
10+
PLATFORMS: linux/amd64,linux/arm64
1011

1112
jobs:
1213
build-push:
1314
runs-on: ubuntu-latest
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
platform:
18-
- linux/amd64
19-
- linux/arm64
15+
2016
steps:
2117
-
2218
name: Parse short sha
@@ -49,10 +45,12 @@ jobs:
4945
name: Set up QEMU
5046
uses: docker/setup-qemu-action@v3
5147
with:
52-
platforms: ${{ matrix.platform }}
48+
platforms: ${{ env.PLATFORMS }}
5349
-
5450
name: Set up Docker Buildx
5551
uses: docker/setup-buildx-action@v3
52+
with:
53+
platforms: ${{ env.PLATFORMS }}
5654
-
5755
name: Extract metadata (tags, labels) for docker image
5856
id: meta
@@ -84,7 +82,7 @@ jobs:
8482
push: true
8583
tags: ${{ steps.meta.outputs.tags }}
8684
labels: ${{ steps.meta.outputs.labels }}
87-
platforms: ${{ matrix.platform }}
85+
platforms: ${{ env.PLATFORMS }}
8886
build-args: |
8987
CITYDB_TOOL_VERSION=${{ steps.short-sha.outputs.sha }}
9088
-

.github/workflows/docker-build-push-release.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ on:
66
types: [published, edited]
77
env:
88
IMAGE_NAME: citydb-tool
9+
PLATFORMS: linux/amd64,linux/arm64
910

1011
jobs:
1112
build-push:
1213
runs-on: ubuntu-latest
13-
strategy:
14-
fail-fast: false
15-
matrix:
16-
platform:
17-
- linux/amd64
18-
- linux/arm64
14+
1915
steps:
2016
-
2117
name: Get release version without v
@@ -48,10 +44,12 @@ jobs:
4844
name: Set up QEMU
4945
uses: docker/setup-qemu-action@v3
5046
with:
51-
platforms: ${{ matrix.platform }}
47+
platforms: ${{ env.PLATFORMS }}
5248
-
5349
name: Set up Docker Buildx
5450
uses: docker/setup-buildx-action@v3
51+
with:
52+
platforms: ${{ env.PLATFORMS }}
5553
-
5654
name: Extract metadata (tags, labels) for docker image
5755
id: meta
@@ -83,7 +81,7 @@ jobs:
8381
push: true
8482
tags: ${{ steps.meta.outputs.tags }}
8583
labels: ${{ steps.meta.outputs.labels }}
86-
platforms: ${{ matrix.platform }}
84+
platforms: ${{ env.PLATFORMS }}
8785
build-args: |
8886
CITYDB_TOOL_VERSION=${{ steps.release_version.outputs.version }}
8987
-

0 commit comments

Comments
 (0)