Skip to content

Commit

Permalink
ci: enable freebsd container image builds
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <[email protected]>
  • Loading branch information
rchincha committed Oct 6, 2023
1 parent 044ea85 commit 55157b0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion build/stacker-conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/stacker-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/stacker-zb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/stacker-zxp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 55157b0

Please sign in to comment.