fix: mix self-hosted and ubuntu for arm/v6 and amd #176
This file contains 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: Docker Multiplatform Build ci | |
on: | |
push: | |
branches: | |
- 'matrix' | |
jobs: | |
jbuild: | |
# https://docs.docker.com/build/ci/github-actions/multi-platform/ | |
# distributebuild across multiple runners | |
# This step build the same image on different runners / platforms | |
strategy: | |
fail-fast: false | |
matrix: | |
debian: [buster, bullseye, bookworm] | |
php: [7.3, 8.1, 8.2] | |
# linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 | |
platform: [amd64, arm64, arm/v6, arm/v7] | |
jeedom: ["V4-stable", "beta"] | |
target: ["light", "full"] | |
xdebug: [true, false] | |
exclude: | |
# exclude Jeedom beta on every buster, not supported | |
- debian: "buster" | |
jeedom: "beta" | |
# exclude Jeedom debug on every buster, useless | |
- debian: "buster" | |
xdebug: false | |
# exclude php version for each debian | |
- debian: buster | |
php: 8.1 | |
- debian: buster | |
php: 8.2 | |
- debian: bookworm | |
php: 8.1 | |
- debian: bookworm | |
php: 7.3 | |
- debian: bullseye | |
php: 8.2 | |
env: | |
REGISTRY_IMAGE: pifou25/jeedom | |
TAG_NAME: ${{ matrix.debian }}-${{ matrix.php }}${{ matrix.target == 'light' && '-light' || '' }}${{ matrix.jeedom == 'beta' && '-beta' || '' }}${{ matrix.xdebug && '-debug' || '' }}${{ github.ref_name != 'master' && '-dev' || '' }} | |
TAG_LATEST_ENABLED: ${{ (matrix.debian == 'bullseye' && matrix.target == 'full' && matrix.jeedom == 'V4-stable' && matrix.target == 'full' && matrix.xdebug == 'false' && github.ref_name == 'master') }} | |
runs-on: ${{ matrix.platform == 'arm64' && 'ARM64' || matrix.platform == 'arm/v7' && 'ARM' || 'self-hosted' }} | |
steps: | |
- | |
name: Prepare ${{ env.TAG_NAME }}:${{ matrix.platform }} | |
# replace / by - in platform value | |
run: | | |
platform=linux/${{ matrix.platform }} | |
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | |
echo "${TAG_NAME}:${PLATFORM_PAIR}" >> $GITHUB_STEP_SUMMARY |