Skip to content

Commit 92ad1cb

Browse files
author
charlesgauthereau
committed
chore(release): 1.0.4-rc.17
1 parent 82d5306 commit 92ad1cb

4 files changed

Lines changed: 175 additions & 63 deletions

File tree

.github/workflows/docker.yml

Lines changed: 172 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,131 @@
6868
# push: true
6969
# tags: ${{ steps.set-tags.outputs.tags }}
7070
# target: ${{ inputs.target }}
71+
#
72+
#name: Docker Publish
73+
#
74+
#on:
75+
# workflow_call:
76+
# inputs:
77+
# image_name:
78+
# required: false
79+
# type: string
80+
# default: 'portabase/agent'
81+
# add_latest:
82+
# required: false
83+
# type: boolean
84+
# default: false
85+
# target:
86+
# required: false
87+
# type: string
88+
# default: 'prod'
89+
# dockerfile:
90+
# required: false
91+
# type: string
92+
# default: './docker/Dockerfile'
93+
# secrets:
94+
# DOCKER_USERNAME:
95+
# required: true
96+
# DOCKER_PASSWORD:
97+
# required: true
98+
#
99+
#jobs:
100+
# build-amd64:
101+
# name: Build AMD64 Image
102+
# runs-on: ubuntu-latest
103+
# outputs:
104+
# image: ${{ steps.set-job-output.outputs.image }}
105+
# steps:
106+
# - uses: actions/checkout@v4
107+
#
108+
# - uses: docker/setup-buildx-action@v3
109+
#
110+
# - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
111+
# with:
112+
# username: ${{ secrets.DOCKER_USERNAME }}
113+
# password: ${{ secrets.DOCKER_PASSWORD }}
114+
#
115+
# - name: Set AMD64 image tag
116+
# id: set-tags
117+
# run: |
118+
# REF_NAME=${GITHUB_REF#refs/tags/}
119+
# AMD64_IMAGE="${{ inputs.image_name }}:$REF_NAME-amd64"
120+
# echo "amd64_image=$AMD64_IMAGE" >> $GITHUB_OUTPUT
121+
#
122+
# - name: Build and push AMD64
123+
# uses: docker/build-push-action@v6
124+
# with:
125+
# context: .
126+
# file: ${{ inputs.dockerfile }}
127+
# platforms: linux/amd64
128+
# push: true
129+
# tags: ${{ steps.set-tags.outputs.amd64_image }}
130+
# target: ${{ inputs.target }}
131+
#
132+
# build-arm64:
133+
# name: Build ARM64 Image
134+
# runs-on: ubuntu-24.04-arm
135+
# outputs:
136+
# image: ${{ steps.set-job-output.outputs.image }}
137+
# steps:
138+
# - uses: actions/checkout@v4
139+
#
140+
# - uses: docker/setup-buildx-action@v3
141+
#
142+
# - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
143+
# with:
144+
# username: ${{ secrets.DOCKER_USERNAME }}
145+
# password: ${{ secrets.DOCKER_PASSWORD }}
146+
#
147+
# - name: Set ARM64 image tag
148+
# id: set-tags
149+
# run: |
150+
# REF_NAME=${GITHUB_REF#refs/tags/}
151+
# ARM64_IMAGE="${{ inputs.image_name }}:$REF_NAME-arm64"
152+
# echo "arm64_image=$ARM64_IMAGE" >> $GITHUB_OUTPUT
153+
#
154+
# - name: Build and push ARM64
155+
# uses: docker/build-push-action@v6
156+
# with:
157+
# context: .
158+
# file: ${{ inputs.dockerfile }}
159+
# platforms: linux/arm64
160+
# push: true
161+
# tags: ${{ steps.set-tags.outputs.arm64_image }}
162+
# target: ${{ inputs.target }}
163+
#
164+
#
165+
# create-manifest:
166+
# name: Create Multi-Arch Manifest
167+
# runs-on: ubuntu-latest
168+
# needs:
169+
# - build-amd64
170+
# - build-arm64
171+
# steps:
172+
# - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
173+
# with:
174+
# username: ${{ secrets.DOCKER_USERNAME }}
175+
# password: ${{ secrets.DOCKER_PASSWORD }}
176+
#
177+
# - name: Create Docker manifest
178+
# run: |
179+
# REF_NAME=${GITHUB_REF#refs/tags/}
180+
#
181+
# IMAGE="${{ inputs.image_name }}:$REF_NAME"
182+
# AMD64_IMAGE="$IMAGE-amd64"
183+
# ARM64_IMAGE="$IMAGE-arm64"
184+
#
185+
# echo "AMD64_IMAGE=$AMD64_IMAGE"
186+
# echo "ARM64_IMAGE=$ARM64_IMAGE"
187+
#
188+
# docker manifest create $IMAGE $AMD64_IMAGE $ARM64_IMAGE
189+
# docker manifest push $IMAGE
190+
#
191+
# if [ "${{ inputs.add_latest }}" = "true" ]; then
192+
# docker manifest create ${{ inputs.image_name }}:latest $AMD64_IMAGE $ARM64_IMAGE
193+
# docker manifest push ${{ inputs.image_name }}:latest
194+
# fi
195+
71196

72197
name: Docker Publish
73198

@@ -97,96 +222,83 @@ on:
97222
required: true
98223

99224
jobs:
100-
build-amd64:
101-
name: Build AMD64 Image
102-
runs-on: ubuntu-latest
103-
outputs:
104-
image: ${{ steps.set-job-output.outputs.image }}
225+
build:
226+
name: Build and push Docker images
227+
runs-on: ${{ matrix.platform == 'linux/amd64' && 'ubuntu-latest' || matrix.platform == 'linux/arm64' && 'ubuntu-24.04-arm' }}
228+
strategy:
229+
fail-fast: false
230+
matrix:
231+
platform: [linux/amd64, linux/arm64]
105232
steps:
106-
- uses: actions/checkout@v4
107-
108-
- uses: docker/setup-buildx-action@v3
233+
- name: Checkout
234+
uses: actions/checkout@v4
109235

110-
- uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
236+
- name: Login to Docker
237+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
111238
with:
112239
username: ${{ secrets.DOCKER_USERNAME }}
113240
password: ${{ secrets.DOCKER_PASSWORD }}
114241

115-
- name: Set AMD64 image tag
242+
- name: Set image tag
116243
id: set-tags
117244
run: |
118245
REF_NAME=${GITHUB_REF#refs/tags/}
119-
AMD64_IMAGE="${{ inputs.image_name }}:$REF_NAME-amd64"
120-
echo "amd64_image=$AMD64_IMAGE" >> $GITHUB_OUTPUT
246+
if [ "${{ matrix.platform }}" = "linux/amd64" ]; then
247+
IMAGE="${{ inputs.image_name }}:$REF_NAME-amd64"
248+
else
249+
IMAGE="${{ inputs.image_name }}:$REF_NAME-arm64"
250+
fi
251+
echo "image=$IMAGE" >> $GITHUB_OUTPUT
121252
122-
- name: Build and push AMD64
253+
- name: Build and push image
123254
uses: docker/build-push-action@v6
124255
with:
125256
context: .
126257
file: ${{ inputs.dockerfile }}
127-
platforms: linux/amd64
258+
platforms: ${{ matrix.platform }}
128259
push: true
129-
tags: ${{ steps.set-tags.outputs.amd64_image }}
260+
tags: ${{ steps.set-tags.outputs.image }}
130261
target: ${{ inputs.target }}
131262

132-
build-arm64:
133-
name: Build ARM64 Image
134-
runs-on: ubuntu-24.04-arm
135-
outputs:
136-
image: ${{ steps.set-job-output.outputs.image }}
137-
steps:
138-
- uses: actions/checkout@v4
139-
140-
- uses: docker/setup-buildx-action@v3
141-
142-
- uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
143-
with:
144-
username: ${{ secrets.DOCKER_USERNAME }}
145-
password: ${{ secrets.DOCKER_PASSWORD }}
146-
147-
- name: Set ARM64 image tag
148-
id: set-tags
149-
run: |
150-
REF_NAME=${GITHUB_REF#refs/tags/}
151-
ARM64_IMAGE="${{ inputs.image_name }}:$REF_NAME-arm64"
152-
echo "arm64_image=$ARM64_IMAGE" >> $GITHUB_OUTPUT
263+
- name: Upload image tag for manifest
264+
id: upload
265+
run: echo "${{ steps.set-tags.outputs.image }}" > image.txt
153266

154-
- name: Build and push ARM64
155-
uses: docker/build-push-action@v6
267+
- uses: actions/upload-artifact@v3
156268
with:
157-
context: .
158-
file: ${{ inputs.dockerfile }}
159-
platforms: linux/arm64
160-
push: true
161-
tags: ${{ steps.set-tags.outputs.arm64_image }}
162-
target: ${{ inputs.target }}
163-
269+
name: image-${{ matrix.platform }}
270+
path: image.txt
164271

165272
create-manifest:
166-
name: Create Multi-Arch Manifest
273+
name: Create multi-arch Docker manifest
167274
runs-on: ubuntu-latest
168-
needs:
169-
- build-amd64
170-
- build-arm64
275+
needs: build
171276
steps:
172-
- uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
277+
- uses: actions/download-artifact@v3
278+
with:
279+
name: image-linux/amd64
280+
path: /tmp/digests
281+
282+
- uses: actions/download-artifact@v3
283+
with:
284+
name: image-linux/arm64
285+
path: /tmp/digests
286+
287+
- name: Login to Docker
288+
uses: docker/login-action@v3
173289
with:
174290
username: ${{ secrets.DOCKER_USERNAME }}
175291
password: ${{ secrets.DOCKER_PASSWORD }}
176292

177-
- name: Create Docker manifest
293+
- name: Create and push manifest
178294
run: |
295+
AMD64_IMAGE=$(cat /tmp/digests/image-linux/amd64/image.txt)
296+
ARM64_IMAGE=$(cat /tmp/digests/image-linux/arm64/image.txt)
179297
REF_NAME=${GITHUB_REF#refs/tags/}
180-
181-
IMAGE="${{ inputs.image_name }}:$REF_NAME"
182-
AMD64_IMAGE="$IMAGE-amd64"
183-
ARM64_IMAGE="$IMAGE-arm64"
184-
185-
echo "AMD64_IMAGE=$AMD64_IMAGE"
186-
echo "ARM64_IMAGE=$ARM64_IMAGE"
298+
MANIFEST_IMAGE="${{ inputs.image_name }}:$REF_NAME"
187299
188-
docker manifest create $IMAGE $AMD64_IMAGE $ARM64_IMAGE
189-
docker manifest push $IMAGE
300+
docker manifest create $MANIFEST_IMAGE $AMD64_IMAGE $ARM64_IMAGE
301+
docker manifest push $MANIFEST_IMAGE
190302
191303
if [ "${{ inputs.add_latest }}" = "true" ]; then
192304
docker manifest create ${{ inputs.image_name }}:latest $AMD64_IMAGE $ARM64_IMAGE

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ keywords:
2222
- self-hosted
2323
- portabase
2424
license: Apache-2.0
25-
version: 1.0.4-rc.16
25+
version: 1.0.4-rc.17
2626
date-released: "2026-01-28"

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "portabase-agent"
3-
version = "1.0.4-rc.16"
3+
version = "1.0.4-rc.17"
44
edition = "2024"
55

66
[dependencies]

0 commit comments

Comments
 (0)