0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-30 22:34:13 -05:00

ci: enable freebsd container image builds

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
Ramkumar Chinchani 2023-09-02 22:52:43 +00:00
parent 044ea85279
commit 55157b0640
No known key found for this signature in database
GPG key ID: 454D1719210F6D01
6 changed files with 17 additions and 6 deletions

View file

@ -16,7 +16,7 @@ jobs:
packages: write
strategy:
matrix:
os: [linux, darwin]
os: [linux, darwin, freebsd]
arch: [amd64, arm64]
steps:
- name: Check out the repo
@ -27,6 +27,13 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup build vars
run: |
if [ ${{ matrix.os }} == "freebsd" ]; then
echo "BASE_IMAGE=dougrabson/freebsd-minimal:13" >> $GITHUB_ENV
else
echo "BASE_IMAGE=gcr.io/distroless/base:latest-${{ matrix.arch }}" >> $GITHUB_ENV
fi
- name: Build and push zot container image
uses: project-stacker/stacker-build-push-action@main
with:
@ -37,6 +44,7 @@ jobs:
OS=${{ matrix.os }}
ARCH=${{ matrix.arch }}
REPO_NAME=zot-${{ matrix.os }}-${{ matrix.arch }}
BASE_IMAGE=${{ env.BASE_IMAGE }}
url: docker://ghcr.io/${{ github.repository_owner }}
tags: ${{ github.event.release.tag_name }} latest
username: ${{ github.actor }}
@ -84,6 +92,7 @@ jobs:
ARCH=${{ matrix.arch }}
EXT=-minimal
REPO_NAME=zot-minimal-${{ matrix.os }}-${{ matrix.arch }}
BASE_IMAGE=${{ env.BASE_IMAGE }}
url: docker://ghcr.io/${{ github.repository_owner }}
tags: ${{ github.event.release.tag_name }} latest
username: ${{ github.actor }}
@ -130,6 +139,7 @@ jobs:
OS=${{ matrix.os }}
ARCH=${{ matrix.arch }}
REPO_NAME=zxp-${{ matrix.os }}-${{ matrix.arch }}
BASE_IMAGE=${{ env.BASE_IMAGE }}
url: docker://ghcr.io/${{ github.repository_owner }}
tags: ${{ github.event.release.tag_name }} latest
username: ${{ github.actor }}
@ -176,6 +186,7 @@ jobs:
OS=${{ matrix.os }}
ARCH=${{ matrix.arch }}
REPO_NAME=zb-${{ matrix.os }}-${{ matrix.arch }}
BASE_IMAGE=${{ env.BASE_IMAGE }}
url: docker://ghcr.io/${{ github.repository_owner }}
tags: ${{ github.event.release.tag_name }} latest
username: ${{ github.actor }}

View file

@ -46,7 +46,7 @@ build:
arch: ${{ARCH}}
from:
type: docker
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
url: docker://${{BASE_IMAGE}}
overlay_dirs:
- source: ../.build/${{REPO_NAME}}/binary
dest: /usr/local/bin

View file

@ -45,7 +45,7 @@ build:
arch: ${{ARCH}}
from:
type: docker
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
url: docker://${{BASE_IMAGE}}
overlay_dirs:
- source: ../.build/${{REPO_NAME}}/binary
dest: /usr/local/bin

View file

@ -24,7 +24,7 @@ build:
arch: ${{ARCH}}
from:
type: docker
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
url: docker://${{BASE_IMAGE}}
overlay_dirs:
- source: ../.build/${{REPO_NAME}}/binary
dest: /usr/local/bin

View file

@ -44,7 +44,7 @@ build:
arch: ${{ARCH}}
from:
type: docker
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
url: docker://${{BASE_IMAGE}}
overlay_dirs:
- source: ../.build/${{REPO_NAME}}/binary
dest: /usr/local/bin

View file

@ -59,7 +59,7 @@ build:
arch: ${{ARCH}}
from:
type: docker
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
url: docker://${{BASE_IMAGE}}
overlay_dirs:
- source: ../.build/${{REPO_NAME}}/binary
dest: /usr/local/bin