Skip to content

Commit 63fa9d1

Browse files
authored
Merge pull request #740 from onekey-sec/fix-docker-build
Fix docker build
2 parents 7b9f9a6 + 613d5c5 commit 63fa9d1

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

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

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ jobs:
1818
- linux/amd64
1919
- linux/arm64
2020
steps:
21+
- name: Prepare
22+
run: |
23+
platform=${{ matrix.platform }}
24+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
25+
2126
- name: Checkout source code
2227
uses: actions/checkout@v4
2328

@@ -39,6 +44,7 @@ jobs:
3944
type=raw,value=latest,enable={{is_default_branch}}
4045
type=ref,event=branch
4146
type=sha
47+
4248
- name: Set up QEMU
4349
uses: docker/setup-qemu-action@v3
4450

@@ -94,7 +100,7 @@ jobs:
94100
- name: Upload digest
95101
uses: actions/upload-artifact@v4
96102
with:
97-
name: ${{ matrix.platform }}-digests
103+
name: digest-${{ env.PLATFORM_PAIR }}
98104
path: /tmp/digests/*
99105
if-no-files-found: error
100106
retention-days: 1
@@ -107,21 +113,30 @@ jobs:
107113
- name: Download digests
108114
uses: actions/download-artifact@v4
109115
with:
110-
name: digests
111116
path: /tmp/digests
117+
pattern: digest-*
118+
merge-multiple: true
119+
112120
- name: Set up Docker Buildx
113121
uses: docker/setup-buildx-action@v3
122+
114123
- name: Docker meta
115124
id: meta
116125
uses: docker/metadata-action@v5
117126
with:
118127
images: ${{ env.DOCKER_IMAGE }}
128+
tags: |
129+
type=raw,value=latest,enable={{is_default_branch}}
130+
type=ref,event=branch
131+
type=sha
132+
119133
- name: Login to GitHub Container Registry
120134
uses: docker/login-action@v3
121135
with:
122136
registry: ghcr.io
123137
username: ${{ github.actor }}
124138
password: ${{ secrets.GITHUB_TOKEN }}
139+
125140
- name: Create manifest list and push
126141
working-directory: /tmp/digests
127142
run: |

0 commit comments

Comments
 (0)