Skip to content

Add multi-platform support and restructure CI job generation #10

Add multi-platform support and restructure CI job generation

Add multi-platform support and restructure CI job generation #10

Workflow file for this run

name: PR workflow
on:
pull_request:
jobs:
common:
uses: ./.github/workflows/common.yml
test:
needs: common
strategy: ${{ fromJson(needs.common.outputs.strategy) }}
name: ${{ matrix.name }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Pull dependencies
uses: docker/build-push-action@v5
with:
context: ${{ matrix.dir }}
pull: true
- name: Build test image
uses: docker/build-push-action@v5
with:
context: ${{ matrix.dir }}
load: true
tags: test-image
- name: Run tests
run: docker run --rm test-image php --version
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ matrix.dir }}
platforms: ${{ matrix.arches }}
tags: ${{ matrix.tags }}