From 55157b0640f04b5bd0a1be3fae842c93958b3dad Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Sat, 2 Sep 2023 22:52:43 +0000 Subject: [PATCH] ci: enable freebsd container image builds Signed-off-by: Ramkumar Chinchani --- .github/workflows/publish.yaml | 13 ++++++++++++- build/stacker-conformance.yaml | 2 +- build/stacker-minimal.yaml | 2 +- build/stacker-zb.yaml | 2 +- build/stacker-zxp.yaml | 2 +- build/stacker.yaml | 2 +- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 9e07c39dd..486e71110 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -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 }} diff --git a/build/stacker-conformance.yaml b/build/stacker-conformance.yaml index ef38b878f..c670ebba9 100644 --- a/build/stacker-conformance.yaml +++ b/build/stacker-conformance.yaml @@ -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 diff --git a/build/stacker-minimal.yaml b/build/stacker-minimal.yaml index f182937b6..b6fde5630 100644 --- a/build/stacker-minimal.yaml +++ b/build/stacker-minimal.yaml @@ -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 diff --git a/build/stacker-zb.yaml b/build/stacker-zb.yaml index 447e34588..cf8e4a2d3 100644 --- a/build/stacker-zb.yaml +++ b/build/stacker-zb.yaml @@ -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 diff --git a/build/stacker-zxp.yaml b/build/stacker-zxp.yaml index 933f800be..66455ccf6 100644 --- a/build/stacker-zxp.yaml +++ b/build/stacker-zxp.yaml @@ -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 diff --git a/build/stacker.yaml b/build/stacker.yaml index 77999aa7f..7b480afc6 100644 --- a/build/stacker.yaml +++ b/build/stacker.yaml @@ -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