Skip to content

Commit f58764e

Browse files
committed
ci: merge image arch
1 parent 7e14e42 commit f58764e

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
push:
66
branches:
77
- main
8+
paths-ignore:
9+
- 'README.md'
810

911
jobs:
1012
build:
@@ -107,4 +109,41 @@ jobs:
107109
with:
108110
context: .
109111
push: true
110-
tags: mikupush/server:${{ steps.version.outputs.current }},mikupush/server:latest
112+
tags: mikupush/server:${{ steps.version.outputs.current }}-${{ matrix.arch }},mikupush/server:latest-${{ matrix.arch }}
113+
114+
docker-image-merge:
115+
needs: docker-image
116+
runs-on: ubuntu-24.04
117+
steps:
118+
- uses: actions/checkout@v4
119+
120+
- name: Set up Docker Buildx
121+
uses: docker/setup-buildx-action@v3
122+
123+
- name: Login to Docker Hub
124+
uses: docker/login-action@v3
125+
with:
126+
username: ${{ secrets.DOCKERHUB_USERNAME }}
127+
password: ${{ secrets.DOCKERHUB_TOKEN }}
128+
129+
- name: Resolve version
130+
id: version
131+
run: |
132+
export VERSION=$(cat VERSION)
133+
echo "current version is $VERSION"
134+
echo "current=$(cat VERSION)" >> $GITHUB_OUTPUT
135+
136+
- name: Merge manifests for latest tag
137+
run: |
138+
docker buildx imagetools create -t mikupush/server:latest \
139+
mikupush/server:latest-amd64 \
140+
mikupush/server:latest-arm64
141+
142+
- name: Merge manifests for version tag
143+
run: |
144+
docker buildx imagetools create -t mikupush/server:${{ steps.version.outputs.current }} \
145+
mikupush/server:${{ steps.version.outputs.current }}-amd64 \
146+
mikupush/server:${{ steps.version.outputs.current }}-arm64
147+
148+
- name: Push
149+
run: docker push mikupush/server:latest && docker push mikupush/server:${{ steps.version.outputs.current }}

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.9
1+
0.0.10

0 commit comments

Comments
 (0)