Container Images #267
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Container Images | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '30 3 * * 0' | |
| workflow_dispatch: | |
| inputs: | |
| wanted: | |
| description: > | |
| Build selected suites. Use "all" for all buildable suites, "active" | |
| for all non-EOL suites, "eol" for all EOL-ed suites, or | |
| comma-separated codenames. Default is "active". | |
| type: string | |
| default: 'active' | |
| dry_run: | |
| description: 'Do not push to registry' | |
| type: boolean | |
| default: true | |
| 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: | | |
| platforms='[ | |
| ["amd64", "linux/amd64"], | |
| ["arm", "linux/arm"], | |
| ["arm64", "linux/arm64"], | |
| ["armel", "linux/arm/v5"], | |
| ["armhf", "linux/arm/v7"], | |
| ["i386", "linux/386"], | |
| ["loong64", "linux/loong64"], | |
| ["mips64el", "linux/mips64le"], | |
| ["ppc64el", "linux/ppc64le"], | |
| ["riscv64", "linux/riscv64"], | |
| ["s390x", "linux/s390x"], | |
| ["mips", "linux/mips"], | |
| ["mipsel", "linux/mipsle"], | |
| ["powerpc", "linux/ppc"], | |
| ["ppc64", "linux/ppc64"], | |
| ["s390", "linux/s390"], | |
| ["sparc", "linux/sparc"], | |
| ["sparc64", "linux/sparc64"], | |
| ["x32", "linux/amd64p32"], | |
| ["alpha", "linux/alpha"], | |
| ["hppa", "linux/hppa"], | |
| ["m68k", "linux/m68k"], | |
| ["sh4", "linux/sh4"] | |
| ]' | |
| disabled_codename='["experimental", "slink", "hamm"]' | |
| disabled_arches='[ | |
| "hurd-amd64", | |
| "hurd-i386", | |
| "ia64", | |
| "kfreebsd-amd64", | |
| "kfreebsd-i386", | |
| "s390", | |
| "x32" | |
| ]' | |
| known_failures='[ | |
| ["forky", "armel", "https://github.com/vicamo/docker-brew-debian/issues/89"], | |
| ["jessie", "arm64", "https://github.com/vicamo/docker-brew-debian/issues/80"], | |
| ["jessie", "ppc64el", "https://github.com/vicamo/docker-brew-debian/issues/81"], | |
| ["etch", "m68k", "https://github.com/vicamo/docker-brew-debian/issues/82"], | |
| ["woody", "mips", "https://github.com/vicamo/docker-brew-debian/issues/84"], | |
| ["woody", "mipsel", "https://github.com/vicamo/docker-brew-debian/issues/84"], | |
| ["woody", "powerpc", "https://github.com/vicamo/docker-brew-debian/issues/83"], | |
| ["potato", "powerpc", "https://github.com/vicamo/docker-brew-debian/issues/84"] | |
| ]' | |
| pin_timestamp='[ | |
| ["bullseye", "armel", "2025-07-21 14:30:34"], | |
| ["bullseye", "mips64el", "2025-07-21 14:30:34"], | |
| ["bullseye", "mipsel", "2025-07-21 14:30:34"], | |
| ["bullseye", "ppc64el", "2025-07-21 14:30:34"], | |
| ["bullseye", "s390x", "2025-07-21 14:30:34"] | |
| ]' | |
| pin_qemu='[ | |
| ["any", "alpha", "deb"], | |
| ["any", "hppa", "deb"], | |
| ["any", "loong64", "deb"], | |
| ["any", "m68k", "deb"], | |
| ["any", "mips", "deb"], | |
| ["any", "mips64el", "deb"], | |
| ["any", "mipsel", "deb"], | |
| ["any", "powerpc", "deb"], | |
| ["any", "ppc64", "deb"], | |
| ["any", "sh4", "deb"], | |
| ["any", "sparc", "deb"], | |
| ["any", "sparc64", "deb"] | |
| ]' | |
| include_pkgs='[ | |
| ["sid", "loong64", "gpgv"], | |
| ["sid", "powerpc", "gpgv"], | |
| ["sid", "ppc64", "gpgv"], | |
| ["sid", "sparc64", "gpgv"] | |
| ]' | |
| codenames="$(echo "${FULL_JSON}" | | |
| jq -c -M 'map(select(.codename as $c | | |
| '"${disabled_codename}"' | | |
| index($c) == null)) | | |
| map(. as $s | | |
| $s.mirrors[0].pockets[$s.codename].architectures as $da | | |
| $s | | |
| { | |
| "distribution":.distribution, | |
| "codename":.codename, | |
| "suite":.suite, | |
| "active":.active, | |
| "architectures":(.architectures - '"${disabled_arches}"' | | |
| map({ | |
| "arch":., | |
| "platform":(. as $arch | | |
| '"${platforms}"' | | |
| map(select(.[0] == $arch))[0][1]), | |
| "use_ports":(. as $arch | | |
| $da | | |
| index($arch) == null), | |
| "known_failure":(. as $arch | | |
| '"${known_failures}"' | | |
| map(select((.[0] == $s.codename) and (.[1] == $arch)) | .[2]) | | |
| first), | |
| "timestamp":(. as $arch | | |
| '"${pin_timestamp}"' | | |
| map(select((.[0] == $s.codename) and (.[1] == $arch)) | .[2]) | | |
| first), | |
| "qemu":(. as $arch | | |
| '"${pin_qemu}"' | | |
| map(select(((.[0] == $s.codename) and (.[1] == $arch)) | |
| or ((.[0] == "any") and (.[1] == $arch)) | |
| or ((.[0] == $s.codename) and (.[1] == "any"))) | .[2]) | | |
| first), | |
| "pkgs":(. as $arch | | |
| '"${include_pkgs}"' | | |
| map(select(((.[0] == $s.codename) and (.[1] == $arch))) | .[2]) | | |
| first), | |
| }) | | |
| tostring) | |
| })')" | |
| case "${{ inputs.wanted || 'active' }}" in | |
| all) ;; | |
| active) | |
| codenames="$(echo "${codenames}" | jq -c -M 'map(select(.active))')" | |
| ;; | |
| eol) | |
| codenames="$(echo "${codenames}" | jq -c -M 'map(select(.active | not))')" | |
| ;; | |
| *) | |
| wanted="$(echo "${{ inputs.wanted }}" | sed 's/ //g; s/\([^,]\+\)/"\1"/g')" | |
| codenames="$(echo "${codenames}" | | |
| jq -c -M 'map(. as $row | | |
| ['"${wanted}"'] | .[] | select($row.codename == .) | | |
| $row)')" | |
| ;; | |
| esac | |
| echo "::group::Built JSON(codenames)" | |
| echo "${codenames}" | jq | |
| echo "::endgroup::" | |
| echo "codenames=${codenames}" | tee -a "${GITHUB_OUTPUT}" | |
| debuerreotype: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Debuerreotype | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| repository: vicamo/docker_debuerreotype | |
| ref: 20251021 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| version: v0.12.0 | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: '.' | |
| outputs: type=docker,dest=/tmp/debuerreotype.tar | |
| tags: local/debuerreotype:latest | |
| - name: Upload debuerreotype image tarball | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: debuerreotype | |
| path: /tmp/debuerreotype.tar | |
| retention-days: 1 | |
| per-suite: | |
| name: Per Suite | |
| needs: | |
| - debuerreotype | |
| - matrix | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 1 | |
| matrix: | |
| include: ${{ fromJSON(needs.matrix.outputs.codenames) }} | |
| uses: ./.github/workflows/per-suite.yml | |
| secrets: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| with: | |
| distribution: ${{ matrix.distribution }} | |
| codename: ${{ matrix.codename }} | |
| suite: ${{ matrix.suite }} | |
| active: ${{ matrix.active }} | |
| architectures: ${{ matrix.architectures }} | |
| repository: 'vicamo/debian' | |
| dry_run: | |
| ${{ github.ref_name != 'main' || (github.event_name == | |
| 'workflow_dispatch' && inputs.dry_run) }} |