Add multi-arch Docker builds to CI run #3180
Workflow file for this run
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: CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
ci: | |
name: Build CI container | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
# @todo move after the build | |
- name: Build docker image (multi-arch validation) | |
uses: docker/build-push-action@v6 | |
with: | |
target: development | |
tags: ghcr.io/roave/docbooktool:test-image | |
platforms: linux/amd64,linux/arm64 | |
cache-from: type=gha,scope=ci-cache | |
cache-to: type=gha,mode=max,scope=ci-cache | |
- name: Build docker image | |
uses: docker/build-push-action@v6 | |
with: | |
target: development | |
tags: ghcr.io/roave/docbooktool:test-image | |
push: false | |
load: true | |
cache-from: type=gha,scope=ci-cache | |
cache-to: type=gha,mode=max,scope=ci-cache | |
- name: Psalm | |
run: docker run --rm --entrypoint=php ghcr.io/roave/docbooktool:test-image vendor/bin/psalm | |
- name: PHPUnit | |
run: docker run --rm --entrypoint=php ghcr.io/roave/docbooktool:test-image vendor/bin/phpunit | |
- name: "PHPCS" | |
run: docker run --rm --entrypoint=php ghcr.io/roave/docbooktool:test-image vendor/bin/phpcs |