Skip to content

ci: build multiarched docker images #38

ci: build multiarched docker images

ci: build multiarched docker images #38

Workflow file for this run

name: Container Images
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
matrix:
name: Build Matrix
runs-on: ubuntu-latest
outputs:
full_json: ${{ steps.releases.outputs.json }}
codenames: ${{ steps.pp.outputs.codenames }}
codename_arch: ${{ steps.pp.outputs.codename_arch }}
steps:
- name: Releases Info
id: releases
uses: vicamo/actions-library/debian-releases@v1
- name: Post Processing
id: pp
env:
FULL_JSON: ${{ steps.releases.outputs.json }}
run: |
disabled='["hurd-amd64", "hurd-i386", "ia64", "kfreebsd-amd64", "kfreebsd-i386"]'
codenames="$(echo "${FULL_JSON}" | \
jq -c -M '[ .[1] as $s | $s.mirrors[0].pockets[$s.codename].architectures as $da | $s | {"distribution":.distribution,"codename":.codename,"suite":.suite,"active":.active,"architectures":(.architectures - '"${disabled}"' | map({"arch":.,"ports":(. as $arch | $da | index($arch) == null)}) | tostring)} ]')"
echo "::group::Built JSON(codenames)"
echo "${codenames}" | jq
echo "::endgroup::"
codename_arch="$(echo "${FULL_JSON}" | \
jq -c -M '[ .[1] as $s | ($s.architectures - '"${disabled}"') | {"distribution":$s.distribution,"codename":$s.codename,"suite":$s.suite,"active":$s.active,"architectures":.} ]')"
echo "::group::Built JSON(codename and architectures)"
echo "${codename_arch}" | jq
echo "::endgroup::"
{ \
echo "codenames=${codenames}"; \
echo "codename_arch=${codename_arch}"; \
} | tee -a "${GITHUB_OUTPUT}"
per-suite:
name: Per Suite
needs:
- matrix
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.matrix.outputs.codenames) }}
uses: ./.github/workflows/per-suite.yml
with:
distribution: ${{ matrix.distribution }}
codename: ${{ matrix.codename }}
suite: ${{ matrix.suite }}
active: ${{ matrix.active }}
architectures: ${{ matrix.architectures }}