diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 15d6fc449..724115a3a 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -181,7 +181,7 @@ jobs: packages: write strategy: matrix: - os: [linux, darwin] + os: [linux, darwin, freebsd] arch: [amd64, arm64] steps: - name: Check out the repo @@ -192,6 +192,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: @@ -202,6 +209,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 }} @@ -249,6 +257,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 }} @@ -295,6 +304,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 }} @@ -341,6 +351,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