Skip to content

Commit

Permalink
feat: different runs-on for the matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
pifou25 committed May 1, 2024
1 parent 003de10 commit 74647f0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/buildx-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
# https://docs.docker.com/build/ci/github-actions/multi-platform/
# distributebuild across multiple runners
# This step build the same image on different runners / platforms
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
debian: ["buster", "bullseye", "bookworm"]
# php: [7.3, 8.1]
# 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"]
os: ["ubuntu-latest"]
jeedom: ["V4-stable", "beta"]
target: ["light", "full"]
xdebug: [true, false]
Expand All @@ -32,6 +32,12 @@ jobs:
php: 7.4
- debian: "bullseye"
php: 8.1
- platform: "arm/v6"
os: "self-hosted ARM"
- platform: "arm/v7"
os: "self-hosted ARM"
- platform: "arm64"
os: "self-hosted ARM64"
exclude:
# exclude Jeedom beta on every buster, not supported
- debian: "buster"
Expand All @@ -44,11 +50,13 @@ jobs:
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.os }}
steps:
-
name: Prepare ${{ env.TAG_NAME }}:${{ matrix.platform }}
name: Prepare ${{ env.TAG_NAME }}:${{ matrix.platform }}:${{ matrix.os }}
# replace / by - in platform value
run: |
platform=linux/${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
echo "${TAG_NAME}:${PLATFORM_PAIR}" >> $GITHUB_STEP_SUMMARY
echo "${TAG_NAME}:${PLATFORM_PAIR}:${{ matrix.os }}" >> $GITHUB_STEP_SUMMARY

0 comments on commit 74647f0

Please sign in to comment.