Skip to content

Commit 5f56a30

Browse files
committed
ci: enable freebsd container image builds
Signed-off-by: Ramkumar Chinchani <[email protected]>
1 parent 8e36bfd commit 5f56a30

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

.github/workflows/ci-cd.yml

+11
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ jobs:
192192
registry: ghcr.io
193193
username: ${{ github.actor }}
194194
password: ${{ secrets.GITHUB_TOKEN }}
195+
- name: Setup build vars
196+
run: |
197+
if [ ${{ matrix.os }} == "freebsd" ]; then
198+
echo "BASE_IMAGE=dougrabson/freebsd-minimal:13" >> $GITHUB_ENV
199+
else
200+
echo "BASE_IMAGE=gcr.io/distroless/base:latest-${{ matrix.arch }}" >> $GITHUB_ENV
201+
fi
195202
- name: Build and push zot container image
196203
uses: project-stacker/stacker-build-push-action@main
197204
with:
@@ -202,6 +209,7 @@ jobs:
202209
OS=${{ matrix.os }}
203210
ARCH=${{ matrix.arch }}
204211
REPO_NAME=zot-${{ matrix.os }}-${{ matrix.arch }}
212+
BASE_IMAGE=${{ env.BASE_IMAGE }}
205213
url: docker://ghcr.io/${{ github.repository_owner }}
206214
tags: ${{ github.event.release.tag_name }} latest
207215
username: ${{ github.actor }}
@@ -249,6 +257,7 @@ jobs:
249257
ARCH=${{ matrix.arch }}
250258
EXT=-minimal
251259
REPO_NAME=zot-minimal-${{ matrix.os }}-${{ matrix.arch }}
260+
BASE_IMAGE=${{ env.BASE_IMAGE }}
252261
url: docker://ghcr.io/${{ github.repository_owner }}
253262
tags: ${{ github.event.release.tag_name }} latest
254263
username: ${{ github.actor }}
@@ -295,6 +304,7 @@ jobs:
295304
OS=${{ matrix.os }}
296305
ARCH=${{ matrix.arch }}
297306
REPO_NAME=zxp-${{ matrix.os }}-${{ matrix.arch }}
307+
BASE_IMAGE=${{ env.BASE_IMAGE }}
298308
url: docker://ghcr.io/${{ github.repository_owner }}
299309
tags: ${{ github.event.release.tag_name }} latest
300310
username: ${{ github.actor }}
@@ -341,6 +351,7 @@ jobs:
341351
OS=${{ matrix.os }}
342352
ARCH=${{ matrix.arch }}
343353
REPO_NAME=zb-${{ matrix.os }}-${{ matrix.arch }}
354+
BASE_IMAGE=${{ env.BASE_IMAGE }}
344355
url: docker://ghcr.io/${{ github.repository_owner }}
345356
tags: ${{ github.event.release.tag_name }} latest
346357
username: ${{ github.actor }}

build/stacker-conformance.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ build:
4646
arch: ${{ARCH}}
4747
from:
4848
type: docker
49-
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
49+
url: docker://${{BASE_IMAGE}}
5050
overlay_dirs:
5151
- source: ../.build/${{REPO_NAME}}/binary
5252
dest: /usr/local/bin

build/stacker-minimal.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ build:
4545
arch: ${{ARCH}}
4646
from:
4747
type: docker
48-
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
48+
url: docker://${{BASE_IMAGE}}
4949
overlay_dirs:
5050
- source: ../.build/${{REPO_NAME}}/binary
5151
dest: /usr/local/bin

build/stacker-zb.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ build:
2424
arch: ${{ARCH}}
2525
from:
2626
type: docker
27-
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
27+
url: docker://${{BASE_IMAGE}}
2828
overlay_dirs:
2929
- source: ../.build/${{REPO_NAME}}/binary
3030
dest: /usr/local/bin

build/stacker-zxp.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ build:
4444
arch: ${{ARCH}}
4545
from:
4646
type: docker
47-
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
47+
url: docker://${{BASE_IMAGE}}
4848
overlay_dirs:
4949
- source: ../.build/${{REPO_NAME}}/binary
5050
dest: /usr/local/bin

build/stacker.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ build:
5959
arch: ${{ARCH}}
6060
from:
6161
type: docker
62-
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
62+
url: docker://${{BASE_IMAGE}}
6363
overlay_dirs:
6464
- source: ../.build/${{REPO_NAME}}/binary
6565
dest: /usr/local/bin

0 commit comments

Comments
 (0)